/* ============================================================ Traework Design System - 青核 Youthome Web 浅色主题 · 校园社交 ============================================================ */ :root { /* ===== 品牌色 ===== */ --primary: #17B0CF; --primary-hover: #1298B3; --primary-active: #0E8098; --primary-light: #73D3E6; --primary-lighter: #BCEAF3; --primary-bg: #E8F8FB; /* 辅助色 */ --mint: #A8E6CF; /* 浅薄荷青 */ --charcoal: #3C3C3C; /* 炭灰 */ --beige: #FFF8F0; /* 米白 */ --warm-orange: #FFB980; /* 暖浅橙 */ --warm-orange-bg: #FFF1DE; /* ===== 中性色 ===== */ --bg-page: #F7F8FA; --bg-card: #FFFFFF; --bg-sidebar: #FFFFFF; --bg-hover: #F0F1F3; --bg-active: #E8F8FB; --bg-disabled: #F0F1F3; --bg-input: #FFFFFF; --text-primary: #1F1F1F; --text-secondary: #595959; --text-tertiary: #8C8C8C; --text-placeholder: #BFBFBF; --text-disabled: #BFBFBF; --text-white: #FFFFFF; --border: #E8E8E8; --border-light: #F0F0F0; --border-focus: #17B0CF; /* ===== 功能色 ===== */ --success: #52C41A; --success-bg: #F6FFED; --warning: #FAAD14; --warning-bg: #FFFBE6; --error: #F5222D; --error-bg: #FFF1F0; /* ===== 阴影 ===== */ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04); --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06); --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08); --shadow-float: 0 12px 40px rgba(0, 0, 0, 0.1); /* ===== 圆角 ===== */ --radius-xs: 4px; --radius-sm: 8px; /* 按钮 */ --radius-md: 12px; /* 卡片 */ --radius-lg: 16px; /* 标签/弹窗低端 */ --radius-xl: 20px; /* 弹窗高端 */ --radius-full: 9999px; /* ===== 尺寸 ===== */ --control-height: 44px; --sidebar-width: 240px; --topbar-height: 56px; --nav-item-height: 48px; --nav-item-radius: 8px; --search-width: 360px; --search-height: 36px; --page-padding-x: 24px; --card-padding: 20px; --page-width: 1920px; --page-height: 1080px; --content-height: calc(1080px - 56px); /* ===== 毛玻璃 ===== */ --glass-bg: rgba(255, 255, 255, 0.85); --glass-blur: blur(16px); /* ===== 过渡 ===== */ --transition-fast: 0.15s ease; --transition-base: 0.2s ease; --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1); } * { margin: 0; padding: 0; box-sizing: border-box; } html, body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', 'SF Pro Display', 'Helvetica Neue', 'Microsoft YaHei', sans-serif; background: var(--bg-page); color: var(--text-primary); font-size: 14px; line-height: 1.57; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); } a:hover { color: var(--primary-hover); } button { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; color: inherit; } input, textarea, select { font-family: inherit; outline: none; background: transparent; color: inherit; } /* ============================================================ 按钮组件 ============================================================ */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control-height); padding: 0 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; cursor: pointer; transition: all var(--transition-fast); border: 1px solid transparent; user-select: none; white-space: nowrap; } .btn:active { transform: scale(0.98); } .btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(23, 176, 207, 0.25); } .btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 12px rgba(23, 176, 207, 0.3); } .btn-primary:active { background: var(--primary-active); } .btn-primary:disabled { background: var(--primary-lighter); cursor: not-allowed; box-shadow: none; } .btn-secondary { background: #fff; color: var(--text-secondary); border-color: var(--border); } .btn-secondary:hover { border-color: var(--primary); color: var(--primary); } .btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); } .btn-outline:hover { background: var(--primary-bg); } .btn-ghost { background: transparent; color: var(--text-secondary); } .btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); } .btn-danger { background: var(--error); color: #fff; } .btn-danger:hover { background: #E01F1F; } .btn-block { width: 100%; } .btn-sm { height: 32px; padding: 0 14px; font-size: 13px; } .btn-lg { height: 48px; padding: 0 28px; font-size: 15px; } .btn-icon { width: var(--control-height); padding: 0; border-radius: var(--radius-sm); } .btn-icon svg { width: 20px; height: 20px; } /* ============================================================ 输入框组件 ============================================================ */ .input-wrap { position: relative; } .input { width: 100%; height: var(--control-height); padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--text-primary); background: #fff; transition: all var(--transition-fast); /* 浅浮雕效果 */ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03); } .input:hover { border-color: var(--text-tertiary); } .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23, 176, 207, 0.12); } .input::placeholder { color: var(--text-placeholder); } .input:disabled { background: var(--bg-disabled); color: var(--text-disabled); cursor: not-allowed; } .input.error { border-color: var(--error); } .input.error:focus { box-shadow: 0 0 0 3px rgba(245, 34, 45, 0.1); } .input-icon-left { padding-left: 42px; } .input-icon-right { padding-right: 42px; } .input-icon { position: absolute; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-tertiary); pointer-events: none; } .input-icon.left { left: 14px; } .input-icon.right { right: 14px; } .input-suffix-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); height: 36px; padding: 0 14px; font-size: 13px; font-weight: 500; color: var(--primary); background: var(--primary-bg); border-radius: 6px; border: none; cursor: pointer; transition: all var(--transition-fast); } .input-suffix-btn:hover { background: var(--primary-lighter); } .input-suffix-btn:disabled { color: var(--text-tertiary); background: var(--bg-hover); cursor: not-allowed; } .input-error-msg { font-size: 12px; color: var(--error); margin-top: 6px; } textarea.input { height: auto; min-height: 100px; padding: 12px 14px; resize: vertical; line-height: 1.6; } /* ============================================================ 标签组件 ============================================================ */ .tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px; border-radius: var(--radius-lg); font-size: 12px; font-weight: 500; line-height: 1.6; } .tag-primary { background: var(--primary-bg); color: var(--primary); } .tag-success { background: var(--success-bg); color: var(--success); } .tag-warning { background: var(--warning-bg); color: var(--warning); } .tag-error { background: var(--error-bg); color: var(--error); } .tag-default { background: var(--bg-hover); color: var(--text-secondary); } .tag-orange { background: var(--warm-orange-bg); color: #E8871A; } .tag-mint { background: #E6FFEF; color: #2BA868; } .tag-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); } /* ============================================================ 卡片组件 ============================================================ */ .card { background: var(--bg-card); border-radius: var(--radius-md); box-shadow: var(--shadow-card); border: 1px solid var(--border-light); } .card-hover { transition: all var(--transition-base); cursor: pointer; } .card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); } /* ============================================================ 头像组件 ============================================================ */ .avatar { border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; background: linear-gradient(135deg, var(--primary-light), var(--primary)); flex-shrink: 0; overflow: hidden; } .avatar-sm { width: 28px; height: 28px; font-size: 11px; } .avatar-md { width: 36px; height: 36px; font-size: 13px; } .avatar-lg { width: 48px; height: 48px; font-size: 16px; } .avatar-xl { width: 72px; height: 72px; font-size: 24px; } .avatar.color-1 { background: linear-gradient(135deg, #73D3E6, #17B0CF); } .avatar.color-2 { background: linear-gradient(135deg, #FFD4A3, #FF9F45); } .avatar.color-3 { background: linear-gradient(135deg, #95E1B5, #52C41A); } .avatar.color-4 { background: linear-gradient(135deg, #FFB3B3, #F5222D); } .avatar.color-5 { background: linear-gradient(135deg, #B5D8FF, #4A90FF); } .avatar.color-6 { background: linear-gradient(135deg, #D4B5FF, #9254DE); } .avatar.color-7 { background: linear-gradient(135deg, #FFB3D9, #EB2F96); } .avatar.color-8 { background: linear-gradient(135deg, #FFE58F, #FAAD14); } /* ============================================================ 图标样式 ============================================================ */ .icon { display: inline-flex; align-items: center; justify-content: center; } .icon svg { stroke-linecap: round; stroke-linejoin: round; } /* ============================================================ 全局滚动条 ============================================================ */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: #D9D9D9; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #BFBFBF; } ::-webkit-scrollbar-track { background: transparent; } /* ============================================================ 工具类 ============================================================ */ .text-primary { color: var(--text-primary); } .text-secondary { color: var(--text-secondary); } .text-tertiary { color: var(--text-tertiary); } .text-brand { color: var(--primary); } .text-success { color: var(--success); } .text-warning { color: var(--warning); } .text-error { color: var(--error); } .fw-400 { font-weight: 400; } .fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; } .fs-14 { font-size: 14px; } .fs-15 { font-size: 15px; } .fs-16 { font-size: 16px; } .fs-18 { font-size: 18px; } .fs-20 { font-size: 20px; } .fs-24 { font-size: 24px; } .fs-32 { font-size: 32px; } .gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .flex { display: flex; } .flex-col { display: flex; flex-direction: column; } .items-center { align-items: center; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } .flex-1 { flex: 1; min-width: 0; } .flex-shrink-0 { flex-shrink: 0; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ellipsis-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .ellipsis-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }