/* ============================================================
Forumlify —— 液态/磨砂玻璃风格(冰川蓝主题)
支持亮色/暗色模式 + 管理后台侧边栏 + 滑动Tab
============================================================ */
/* ===== 亮色模式 ===== */
: root {
/* ===== 主题色(冰川蓝) ===== */
--primary : #5b9bd5 ;
--primary-hover : #4a8ac4 ;
--primary-light : #9ac2e8 ;
--primary-glow : rgba ( 91 , 155 , 213 , 0.25 );
/* ===== 磨砂玻璃颜色 - 亮色 ===== */
--glass-bg : rgba ( 255 , 255 , 255 , 0.62 );
--glass-border : rgba ( 255 , 255 , 255 , 0.30 );
--glass-shadow : 0 8 px 32 px rgba ( 0 , 0 , 0 , 0.08 );
--glass-text : #1a1a2e ;
--glass-text-secondary : #4a4a6a ;
--glass-text-light : #7a7a9a ;
/* ===== 背景渐变 - 亮色 ===== */
--bg-start : #dfe6e9 ;
--bg-end : #b2bec3 ;
/* ===== 圆角(改小) ===== */
--radius : 10 px ;
--radius-sm : 6 px ;
--transition : 0.3 s cubic-bezier ( 0.25 , 0.46 , 0.45 , 0.94 );
--nav-height : 64 px ;
/* ===== 兼容旧变量(React 组件内联样式使用)===== */
--bg : #dfe6e9 ;
--modal-bg : rgba ( 255 , 255 , 255 , 0.85 );
--surface : rgba ( 255 , 255 , 255 , 0.18 );
--border : rgba ( 255 , 255 , 255 , 0.30 );
--border-light : rgba ( 255 , 255 , 255 , 0.12 );
--text : #1a1a2e ;
--text-secondary : #4a4a6a ;
--text-light : #7a7a9a ;
--primary-bg : rgba ( 91 , 155 , 213 , 0.15 );
--shadow : 0 8 px 32 px rgba ( 0 , 0 , 0 , 0.08 );
--shadow-hover : 0 12 px 40 px rgba ( 0 , 0 , 0 , 0.12 );
--navbar-bg : rgba ( 255 , 255 , 255 , 0.35 );
--modal-overlay : rgba ( 15 , 15 , 26 , 0.5 );
--primary-dark : #4a8ac4 ;
}
/* ===== 暗色模式 ===== */
[ data-theme = "dark" ] {
/* ===== 主题色(冰川蓝 - 暗色) ===== */
--primary : #7cb8f0 ;
--primary-hover : #8cc8ff ;
--primary-light : #b0d8ff ;
--primary-glow : rgba ( 91 , 155 , 213 , 0.4 );
/* ===== 磨砂玻璃颜色 - 暗色 ===== */
--glass-bg : rgba ( 30 , 30 , 50 , 0.60 );
--glass-border : rgba ( 255 , 255 , 255 , 0.10 );
--glass-shadow : 0 8 px 32 px rgba ( 0 , 0 , 0 , 0.4 );
--glass-text : #e8e8f0 ;
--glass-text-secondary : #a0a0b8 ;
--glass-text-light : #707090 ;
/* ===== 背景渐变 - 暗色 ===== */
--bg-start : #0f0f1a ;
--bg-end : #1a1a2e ;
/* ===== 圆角(改小) ===== */
--radius : 10 px ;
--radius-sm : 6 px ;
/* ===== 兼容旧变量(React 组件内联样式使用)===== */
--bg : #0f0f1a ;
--modal-bg : rgba ( 24 , 24 , 38 , 0.88 );
--surface : rgba ( 30 , 30 , 50 , 0.35 );
--border : rgba ( 255 , 255 , 255 , 0.10 );
--border-light : rgba ( 255 , 255 , 255 , 0.06 );
--text : #e8e8f0 ;
--text-secondary : #a0a0b8 ;
--text-light : #707090 ;
--primary-bg : rgba ( 124 , 184 , 240 , 0.15 );
--shadow : 0 8 px 32 px rgba ( 0 , 0 , 0 , 0.4 );
--shadow-hover : 0 12 px 40 px rgba ( 0 , 0 , 0 , 0.5 );
--navbar-bg : rgba ( 15 , 15 , 26 , 0.55 );
--modal-overlay : rgba ( 15 , 15 , 26 , 0.6 );
--primary-dark : #8cc8ff ;
}
/* ===== 全局基础 ===== */
* {
margin : 0 ;
padding : 0 ;
box-sizing : border-box ;
}
body {
font-family : - apple-system , BlinkMacSystemFont , "SF Pro Display" , "Segoe UI" , Roboto , "Helvetica Neue" , Arial , sans-serif ;
min-height : 100 vh ;
background : linear-gradient ( 145 deg , var ( -- bg - start ) 0 % , var ( -- bg - end ) 100 % );
background-attachment : fixed ;
color : var ( -- glass - text );
-webkit- font-smoothing : antialiased ;
-moz- osx-font-smoothing : grayscale ;
transition : background 0.5 s ease , color 0.3 s ease ;
}
/* ===== SVG 图标 ===== */
svg {
display : inline-block ;
vertical-align : middle ;
flex-shrink : 0 ;
color : var ( -- glass - text - secondary );
}
/* ===== 按钮 ===== */
. btn-primary {
background : var ( -- glass - bg );
backdrop-filter : blur ( 12 px );
-webkit- backdrop-filter : blur ( 12 px );
color : var ( -- glass - text );
border : 1 px solid var ( -- glass - border );
padding : 10 px 24 px ;
border-radius : var ( -- radius - sm );
font-size : 14 px ;
font-weight : 600 ;
cursor : pointer ;
transition : all var ( -- transition );
box-shadow : var ( -- glass - shadow );
}
. btn-primary : hover {
background : rgba ( 255 , 255 , 255 , 0.25 );
transform : translateY ( -2 px );
box-shadow : 0 12 px 40 px rgba ( 0 , 0 , 0 , 0.12 );
}
. btn-ghost {
background : rgba ( 255 , 255 , 255 , 0.06 );
backdrop-filter : blur ( 8 px );
-webkit- backdrop-filter : blur ( 8 px );
color : var ( -- glass - text - secondary );
border : 1 px solid var ( -- glass - border );
padding : 10 px 24 px ;
border-radius : var ( -- radius - sm );
font-size : 14 px ;
font-weight : 500 ;
cursor : pointer ;
transition : all var ( -- transition );
}
. btn-ghost : hover {
background : rgba ( 255 , 255 , 255 , 0.15 );
color : var ( -- glass - text );
}
[ data-theme = "light" ] # authButtons . btn-ghost {
background : rgba ( 74 , 74 , 106 , 0.1 );
border-color : transparent ;
color : #30304a ;
}
[ data-theme = "light" ] # authButtons . btn-ghost : hover {
background : rgba ( 91 , 155 , 213 , 0.2 );
color : #202038 ;
}
. btn-sm {
padding : 4 px 12 px ;
border-radius : var ( -- radius - sm );
border : none ;
cursor : pointer ;
font-size : 12 px ;
font-weight : 500 ;
transition : all var ( -- transition );
}
. btn-sm : hover {
transform : translateY ( -1 px );
}
. btn-danger {
background : #ef4444 ;
color : #fff ;
}
. btn-danger : hover {
background : #dc2626 ;
}
. btn-success {
background : #22c55e ;
color : #fff ;
}
. btn-success : hover {
background : #16a34a ;
}
. btn-secondary {
background : var ( -- glass - bg );
backdrop-filter : blur ( 8 px );
-webkit- backdrop-filter : blur ( 8 px );
border : 1 px solid var ( -- glass - border );
color : var ( -- glass - text - secondary );
}
. btn-secondary : hover {
background : rgba ( 255 , 255 , 255 , 0.2 );
color : var ( -- glass - text );
}
/* ===== 导航栏 ===== */
# navbar {
height : var ( -- nav - height );
background : var ( -- glass - bg );
backdrop-filter : blur ( 20 px ) saturate ( 180 % );
-webkit- backdrop-filter : blur ( 20 px ) saturate ( 180 % );
border-bottom : 1 px solid var ( -- glass - border );
display : flex ;
align-items : center ;
justify-content : space-between ;
padding : 0 32 px ;
position : sticky ;
top : 0 ;
z-index : 100 ;
box-shadow : var ( -- glass - shadow );
transition : all 0.3 s ease ;
}
. nav-left {
display : flex ;
align-items : center ;
}
. forum-name {
font-weight : 700 ;
font-size : 20 px ;
color : var ( -- glass - text );
cursor : pointer ;
letter-spacing : -0.02 em ;
transition : opacity var ( -- transition );
text-shadow : 0 2 px 10 px rgba ( 0 , 0 , 0 , 0.05 );
}
. forum-name : hover {
opacity : 0.8 ;
}
. nav-right {
display : flex ;
align-items : center ;
}
# authButtons {
display : flex ;
gap : 8 px ;
align-items : center ;
}
. avatar {
width : 36 px ;
height : 36 px ;
border-radius : 50 % ;
cursor : pointer ;
border : 2 px solid var ( -- glass - border );
transition : all var ( -- transition );
object-fit : cover ;
}
. avatar : hover {
border-color : var ( -- primary );
transform : scale ( 1.05 );
}
# userDropdown {
display : flex ;
align-items : center ;
gap : 4 px ;
position : relative ;
}
. dropdown-menu {
display : none ;
position : absolute ;
right : 0 ;
top : 44 px ;
background : var ( -- glass - bg );
backdrop-filter : blur ( 24 px );
-webkit- backdrop-filter : blur ( 24 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius );
box-shadow : var ( -- glass - shadow );
min-width : 180 px ;
padding : 6 px 0 ;
z-index : 200 ;
overflow : hidden ;
}
. dropdown-menu . show {
display : block ;
animation : dropdownFade 0.15 s ease-out ;
}
@ keyframes dropdownFade {
from {
opacity : 0 ;
transform : translateY ( -6 px ) scale ( 0.98 );
}
to {
opacity : 1 ;
transform : translateY ( 0 ) scale ( 1 );
}
}
. dropdown-menu a {
display : block ;
padding : 10 px 18 px ;
color : var ( -- glass - text );
text-decoration : none ;
font-size : 14 px ;
transition : background var ( -- transition );
}
. dropdown-menu a : hover {
background : rgba ( 255 , 255 , 255 , 0.15 );
}
. dropdown-menu a svg {
margin-right : 8 px ;
}
. dropdown-menu hr {
border : none ;
border-top : 1 px solid var ( -- glass - border );
margin : 4 px 8 px ;
}
. nav-icon-btn {
padding : 6 px 8 px ;
background : none ;
border : none ;
cursor : pointer ;
color : var ( -- glass - text - secondary );
border-radius : var ( -- radius - sm );
display : inline-flex ;
align-items : center ;
justify-content : center ;
transition : all var ( -- transition );
}
. nav-icon-btn : hover {
color : var ( -- glass - text );
background : rgba ( 255 , 255 , 255 , 0.15 );
}
/* ===== 主布局 ===== */
# app {
display : flex ;
max-width : 1200 px ;
margin : 0 auto ;
padding : 24 px 32 px 40 px ;
gap : 28 px ;
min-height : calc ( 100 vh - var ( -- nav - height ));
}
/* ===== 侧边栏 ===== */
. sidebar {
width : 240 px ;
flex-shrink : 0 ;
}
. stats-box ,
. links-box {
background : var ( -- glass - bg );
backdrop-filter : blur ( 16 px );
-webkit- backdrop-filter : blur ( 16 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius );
padding : 18 px 20 px ;
margin-bottom : 16 px ;
box-shadow : var ( -- glass - shadow );
transition : all var ( -- transition );
}
. stats-box : hover ,
. links-box : hover {
background : rgba ( 255 , 255 , 255 , 0.25 );
}
. stats-box h4 ,
. links-box h4 {
font-size : 12 px ;
font-weight : 600 ;
color : var ( -- glass - text - secondary );
text-transform : uppercase ;
letter-spacing : 0.06 em ;
margin-bottom : 12 px ;
}
. stats-box h4 svg ,
. links-box h4 svg {
margin-right : 6 px ;
color : var ( -- primary );
}
. stat-item {
display : flex ;
justify-content : space-between ;
font-size : 14 px ;
padding : 5 px 0 ;
border-bottom : 1 px solid rgba ( 255 , 255 , 255 , 0.08 );
}
. stat-item : last-child {
border-bottom : none ;
}
. stat-item span : first-child {
color : var ( -- glass - text - secondary );
}
. stat-item span : last-child {
font-weight : 600 ;
color : var ( -- glass - text );
}
. links-box ul {
list-style : none ;
}
. links-box li {
padding : 4 px 0 ;
}
. links-box li a {
color : var ( -- primary );
text-decoration : none ;
font-size : 14 px ;
transition : color var ( -- transition );
}
. links-box li a : hover {
color : var ( -- primary - hover );
text-decoration : underline ;
}
/* ===== 帖子流 ===== */
# feed {
flex : 1 ;
min-width : 0 ;
}
. feed-header {
display : flex ;
justify-content : space-between ;
align-items : center ;
margin-bottom : 20 px ;
flex-wrap : wrap ;
gap : 10 px ;
}
/* ===== 滑动切换 Tab(纯 CSS,无需 JS) ===== */
. feed-header-left {
display : flex ;
gap : 4 px ;
background : var ( -- glass - bg );
backdrop-filter : blur ( 12 px );
-webkit- backdrop-filter : blur ( 12 px );
padding : 4 px ;
border-radius : var ( -- radius - sm );
border : 1 px solid var ( -- glass - border );
position : relative ;
width : 280 px ;
max-width : 100 % ;
}
/* 滑块 */
. feed-header-left :: after {
content : '' ;
position : absolute ;
top : 4 px ;
left : 4 px ;
width : calc ( 50 % - 4 px );
height : calc ( 100 % - 8 px );
background : rgba ( 255 , 255 , 255 , 0.25 );
backdrop-filter : blur ( 8 px );
-webkit- backdrop-filter : blur ( 8 px );
border-radius : calc ( var ( -- radius - sm ) - 2 px );
transition : transform 0.35 s cubic-bezier ( 0.34 , 1.56 , 0.64 , 1 );
box-shadow : 0 2 px 8 px rgba ( 0 , 0 , 0 , 0.04 );
z-index : 0 ;
pointer-events : none ;
}
/* 当第二个 tab 激活时,滑块右移 */
. feed-header-left : has ( . tab : nth-child ( 2 ) . active ) :: after {
transform : translateX ( 100 % );
}
. tab {
position : relative ;
z-index : 1 ;
background : transparent ;
border : none ;
padding : 6 px 18 px ;
font-size : 14 px ;
font-weight : 500 ;
color : var ( -- glass - text - secondary );
cursor : pointer ;
border-radius : calc ( var ( -- radius - sm ) - 2 px );
transition : color 0.3 s ease ;
flex : 1 1 0 ;
min-width : 0 ;
text-align : center ;
white-space : nowrap ;
}
. tab : hover {
color : var ( -- glass - text );
}
. tab . active {
color : var ( -- glass - text );
background : transparent !important ;
box-shadow : none !important ;
}
. fab-btn {
padding : 8 px 22 px ;
font-size : 14 px ;
font-weight : 500 ;
}
. fab-btn svg {
margin-right : 6 px ;
}
. feed-posts-drawer {
display : grid ;
grid-template-rows : 1 fr ;
opacity : 1 ;
transform-origin : top ;
transition :
grid-template-rows 0.34 s cubic-bezier ( 0.22 , 1 , 0.36 , 1 ),
opacity 0.2 s ease ,
transform 0.34 s cubic-bezier ( 0.22 , 1 , 0.36 , 1 );
}
. feed-posts-drawer-inner {
min-height : 0 ;
overflow : hidden ;
}
. feed-posts-drawer . closing ,
. feed-posts-drawer . closed {
grid-template-rows : 0 fr ;
opacity : 0 ;
transform : scaleY ( 0.985 );
}
. feed-posts-drawer . opening ,
. feed-posts-drawer . idle {
grid-template-rows : 1 fr ;
opacity : 1 ;
transform : scaleY ( 1 );
}
/* ===== 帖子卡片 ===== */
. post-card {
background : var ( -- glass - bg );
backdrop-filter : blur ( 16 px );
-webkit- backdrop-filter : blur ( 16 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius );
padding : 18 px 22 px ;
margin-bottom : 12 px ;
transition : all var ( -- transition );
cursor : pointer ;
box-shadow : var ( -- glass - shadow );
}
. post-card : hover {
background : rgba ( 255 , 255 , 255 , 0.28 );
transform : translateY ( -3 px );
box-shadow : 0 12 px 40 px rgba ( 0 , 0 , 0 , 0.10 );
}
. post-header {
display : flex ;
align-items : center ;
gap : 10 px ;
margin-bottom : 8 px ;
}
. post-avatar {
width : 32 px ;
height : 32 px ;
border-radius : 50 % ;
object-fit : cover ;
border : 2 px solid var ( -- glass - border );
}
. post-username {
font-weight : 600 ;
font-size : 14 px ;
color : var ( -- glass - text );
}
. post-time {
font-size : 12 px ;
color : var ( -- glass - text - light );
margin-left : auto ;
}
. post-title {
font-size : 17 px ;
font-weight : 700 ;
margin : 6 px 0 8 px ;
color : var ( -- glass - text );
line-height : 1.4 ;
letter-spacing : -0.01 em ;
}
. post-content {
font-size : 15 px ;
line-height : 1.7 ;
margin-bottom : 10 px ;
word-break : break-word ;
color : var ( -- glass - text - secondary );
}
. post-images {
display : flex ;
flex-wrap : wrap ;
gap : 6 px ;
margin-bottom : 10 px ;
}
. post-image {
max-width : 200 px ;
max-height : 160 px ;
border-radius : var ( -- radius - sm );
border : 1 px solid var ( -- glass - border );
object-fit : cover ;
transition : transform var ( -- transition );
}
. post-image : hover {
transform : scale ( 1.02 );
}
. post-actions {
display : flex ;
gap : 18 px ;
font-size : 13 px ;
color : var ( -- glass - text - secondary );
align-items : center ;
padding-top : 8 px ;
border-top : 1 px solid var ( -- glass - border );
}
. post-actions svg {
margin-right : 2 px ;
}
. post-actions button {
background : none ;
border : none ;
color : var ( -- glass - text - secondary );
cursor : pointer ;
font-size : 13 px ;
padding : 4 px 6 px ;
border-radius : var ( -- radius - sm );
transition : all var ( -- transition );
}
. post-actions button : hover {
color : var ( -- primary );
background : rgba ( 255 , 255 , 255 , 0.15 );
}
. post-actions . action-delete : hover {
color : #ef4444 ;
background : rgba ( 239 , 68 , 68 , 0.15 );
}
/* ===== 模态框 ===== */
. modal {
display : none ;
position : fixed ;
inset : 0 ;
background : rgba ( 0 , 0 , 0 , 0.3 );
backdrop-filter : blur ( 8 px );
-webkit- backdrop-filter : blur ( 8 px );
align-items : center ;
justify-content : center ;
z-index : 999 ;
}
. modal . active {
display : flex ;
animation : modalFade 0.28 s ease-out ;
}
@ keyframes modalFade {
from { opacity : 0 ; }
to { opacity : 1 ; }
}
. modal-content {
background : var ( -- modal - bg , var ( -- glass - bg ));
backdrop-filter : blur ( 32 px );
-webkit- backdrop-filter : blur ( 32 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius );
padding : 32 px 36 px ;
max-width : 420 px ;
width : 90 % ;
max-height : 90 vh ;
overflow-y : auto ;
position : relative ;
box-shadow : 0 24 px 80 px rgba ( 0 , 0 , 0 , 0.2 );
}
. modal . active . modal-content {
animation : modalContentIn 0.28 s cubic-bezier ( 0.22 , 1 , 0.36 , 1 );
}
@ keyframes modalContentIn {
from { transform : translateY ( 12 px ) scale ( 0.9 ); opacity : 0 ; }
to { transform : translateY ( 0 ) scale ( 1 ); opacity : 1 ; }
}
. modal-content . close {
position : absolute ;
top : 14 px ;
right : 18 px ;
cursor : pointer ;
color : var ( -- glass - text - secondary );
transition : color var ( -- transition );
line-height : 1 ;
background : none ;
border : none ;
}
. modal-content . close : hover {
color : var ( -- glass - text );
}
. modal-content . close svg {
display : block ;
}
. modal-content h2 {
font-size : 22 px ;
font-weight : 700 ;
color : var ( -- glass - text );
margin-bottom : 20 px ;
}
. modal-content h2 svg {
margin-right : 8 px ;
color : var ( -- primary );
}
. modal-content input ,
. modal-content textarea ,
. modal-content select {
width : 100 % ;
padding : 10 px 14 px ;
background : rgba ( 255 , 255 , 255 , 0.12 );
backdrop-filter : blur ( 8 px );
-webkit- backdrop-filter : blur ( 8 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius - sm );
font-size : 14 px ;
color : var ( -- glass - text );
margin-bottom : 12 px ;
font-family : inherit ;
transition : all var ( -- transition );
}
. modal-content input : focus ,
. modal-content textarea : focus ,
. modal-content select : focus {
outline : none ;
background : rgba ( 255 , 255 , 255 , 0.25 );
border-color : var ( -- primary );
box-shadow : 0 0 0 3 px var ( -- primary - glow );
}
. modal-content textarea {
resize : vertical ;
}
. modal-content input :: placeholder ,
. modal-content textarea :: placeholder {
color : var ( -- glass - text - light );
}
. captcha-row {
display : flex ;
align-items : center ;
gap : 12 px ;
margin-bottom : 14 px ;
}
. captcha-row span {
background : rgba ( 255 , 255 , 255 , 0.15 );
padding : 6 px 16 px ;
border-radius : var ( -- radius - sm );
font-size : 16 px ;
font-weight : 600 ;
color : var ( -- primary );
cursor : pointer ;
user-select : none ;
transition : background var ( -- transition );
}
. captcha-row span : hover {
background : rgba ( 255 , 255 , 255 , 0.3 );
}
. captcha-row input {
width : 80 px ;
margin-bottom : 0 ;
}
/* ============================================================
个人设置页面 —— 卡片和输入框
============================================================ */
/* 设置页面卡片 */
# pageSettings . settings-card ,
# pageSettings > div > div ,
# pageSettings [ style *= "background:var(--surface)" ] {
background : var ( -- glass - bg ) !important ;
backdrop-filter : blur ( 16 px ) !important ;
-webkit- backdrop-filter : blur ( 16 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
border-radius : var ( -- radius ) !important ;
box-shadow : var ( -- glass - shadow ) !important ;
transition : all var ( -- transition ) !important ;
}
/* 设置页面输入框 */
# pageSettings input ,
# pageSettings textarea ,
# pageSettings select {
width : 100 % ;
padding : 10 px 14 px ;
background : rgba ( 255 , 255 , 255 , 0.12 ) !important ;
backdrop-filter : blur ( 8 px ) !important ;
-webkit- backdrop-filter : blur ( 8 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
border-radius : var ( -- radius - sm ) !important ;
font-size : 14 px ;
color : var ( -- glass - text ) !important ;
font-family : inherit ;
transition : all var ( -- transition ) !important ;
}
# pageSettings input : focus ,
# pageSettings textarea : focus ,
# pageSettings select : focus {
outline : none !important ;
background : rgba ( 255 , 255 , 255 , 0.25 ) !important ;
border-color : var ( -- primary ) !important ;
box-shadow : 0 0 0 3 px var ( -- primary - glow ) !important ;
}
# pageSettings input :: placeholder ,
# pageSettings textarea :: placeholder {
color : var ( -- glass - text - light ) !important ;
}
# pageSettings textarea {
resize : vertical ;
}
/* 设置页面按钮(覆盖 .btn-secondary) */
# pageSettings . btn-secondary {
background : var ( -- glass - bg ) !important ;
backdrop-filter : blur ( 8 px ) !important ;
-webkit- backdrop-filter : blur ( 8 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
color : var ( -- glass - text - secondary ) !important ;
}
# pageSettings . btn-secondary : hover {
background : rgba ( 255 , 255 , 255 , 0.2 ) !important ;
color : var ( -- glass - text ) !important ;
}
/* 设置页面的头像预览 */
# pageSettings img [ style *= "border-radius:50%" ] {
border : 3 px solid var ( -- glass - border ) !important ;
}
/* 设置页面的统计标签 */
# pageSettings . settings-stat {
color : var ( -- glass - text - secondary ) !important ;
}
/* ============================================================
发帖页面输入框
============================================================ */
# pageNew input ,
# pageNew textarea {
width : 100 % ;
padding : 10 px 14 px ;
background : rgba ( 255 , 255 , 255 , 0.12 );
backdrop-filter : blur ( 8 px );
-webkit- backdrop-filter : blur ( 8 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius - sm );
font-size : 15 px ;
color : var ( -- glass - text );
font-family : inherit ;
transition : all var ( -- transition );
}
# pageNew input : focus ,
# pageNew textarea : focus {
outline : none ;
background : rgba ( 255 , 255 , 255 , 0.25 );
border-color : var ( -- primary );
box-shadow : 0 0 0 3 px var ( -- primary - glow );
}
# pageNew input :: placeholder ,
# pageNew textarea :: placeholder {
color : var ( -- glass - text - light );
}
# pageNew textarea {
resize : vertical ;
}
/* ===== 独立页面(滑入) ===== */
. page-slide {
display : none ;
position : fixed ;
inset : 0 ;
background : var ( -- bg - start );
/* 注意:不能加 backdrop-filter/filter/transform,否则会创建 containing block,
使内部 position:fixed 元素(移动端底部导航、modal)相对本容器定位而非视口 */
z-index : 50 ;
padding : 84 px 32 px 40 px ;
overflow-y : auto ;
transition : background 0.3 s ease ;
}
. page-slide . active {
display : block ;
animation : slideIn 0.35 s cubic-bezier ( 0.22 , 1 , 0.36 , 1 );
}
# pagePost . page-slide . active {
animation : none ;
}
html . post-view-transition # pagePost . post-detail-card ,
html . home-view-transition . returning-home # pagePost . post-detail-card {
view-transition-name : post-expand ;
}
html . post-view-transition # navbar ,
html . home-view-transition # navbar {
view-transition-name : persistent-navbar ;
}
html . post-view-transition # sidebar ,
html . post-view-transition # postSidebar ,
html . home-view-transition . returning-home # sidebar ,
html . home-view-transition . returning-home # postSidebar {
view-transition-name : post-sidebar ;
}
html . post-view-transition # pagePost . post-detail-card . post-time ,
html . home-view-transition . returning-home # pagePost . post-detail-card . post-time {
view-transition-name : post-time ;
}
html . post-view-transition # pagePost . post-page-header h2 ,
html . home-view-transition . returning-home # pagePost . post-page-header h2 {
view-transition-name : post-heading ;
}
html . post-view-transition # pagePost . post-detail-card . post-avatar ,
html . home-view-transition . returning-home # pagePost . post-detail-card . post-avatar {
view-transition-name : post-avatar ;
}
html . post-view-transition # pagePost . post-detail-card . post-username ,
html . home-view-transition . returning-home # pagePost . post-detail-card . post-username {
view-transition-name : post-author ;
}
html . post-view-transition # pagePost . post-detail-card > . post-content ,
html . home-view-transition . returning-home # pagePost . post-detail-card > . post-content {
view-transition-name : post-body ;
}
html . post-view-transition # pagePost . post-detail-card > . post-images ,
html . home-view-transition . returning-home # pagePost . post-detail-card > . post-images {
view-transition-name : post-detail-media ;
}
html . post-view-transition # pagePost . post-detail-card . post-pin-state ,
html . home-view-transition . returning-home # pagePost . post-detail-card . post-pin-state {
view-transition-name : post-pin-state ;
}
html . post-view-transition # pagePost . post-detail-card . post-edited-state ,
html . home-view-transition . returning-home # pagePost . post-detail-card . post-edited-state {
view-transition-name : post-edited-state ;
}
html . post-view-transition # pagePost . post-detail-controls ,
html . home-view-transition . returning-home # pagePost . post-detail-controls {
view-transition-name : post-detail-controls ;
}
html . post-view-transition # pagePost . post-detail-signature ,
html . home-view-transition . returning-home # pagePost . post-detail-signature {
view-transition-name : post-detail-signature ;
}
html . post-view-transition # pagePost . post-reply-count {
opacity : 0 ;
}
html . post-transition-settled # pagePost . post-reply-count {
animation : postReplyCountReveal 0.2 s ease-out both ;
}
@ keyframes postReplyCountReveal {
from {
opacity : 0 ;
transform : translateY ( 4 px );
}
to {
opacity : 1 ;
transform : translateY ( 0 );
}
}
html . post-view-transition . post-card . post-title ,
html . home-view-transition . returning-home . post-card . post-title {
display : block ;
width : max-content ;
max-width : 100 % ;
}
html . post-view-transition :: view-transition ,
html . home-view-transition :: view-transition {
background : linear-gradient ( 145 deg , var ( -- bg - start ) 0 % , var ( -- bg - end ) 100 % );
}
html . post-view-transition :: view-transition-group ( post-expand ),
html . home-view-transition . returning-home :: view-transition-group ( post-expand ) {
animation-duration : 0.96 s ;
animation-timing-function : cubic-bezier ( 0.42 , 0 , 0.58 , 1 );
border-radius : var ( -- radius );
overflow : clip ;
}
html . post-view-transition :: view-transition-image-pair ( post-expand ),
html . home-view-transition . returning-home :: view-transition-image-pair ( post-expand ),
html . post-view-transition :: view-transition-old ( post-expand ),
html . post-view-transition :: view-transition-new ( post-expand ),
html . home-view-transition . returning-home :: view-transition-old ( post-expand ),
html . home-view-transition . returning-home :: view-transition-new ( post-expand ) {
border-radius : var ( -- radius );
overflow : clip ;
}
html . post-view-transition :: view-transition-group ( post-sidebar ) {
animation-duration : 0.72 s ;
animation-timing-function : cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
}
html . post-view-transition :: view-transition-group ( post-heading ) {
animation-duration : 0.64 s ;
animation-timing-function : cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
}
html . post-view-transition :: view-transition-group ( post-avatar ),
html . post-view-transition :: view-transition-group ( post-author ),
html . post-view-transition :: view-transition-group ( post-pin-state ),
html . post-view-transition :: view-transition-group ( post-edited-state ) {
animation-duration : 0.68 s ;
animation-timing-function : cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
}
html . post-view-transition :: view-transition-group ( post-body ) {
animation-duration : 0.96 s ;
animation-timing-function : cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
}
html . post-view-transition :: view-transition-image-pair ( post-body ),
html . home-view-transition . returning-home :: view-transition-image-pair ( post-body ) {
overflow : clip ;
}
html . post-view-transition :: view-transition-group ( post-time ) {
animation-duration : 1.05 s ;
animation-timing-function : cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
}
html . post-view-transition :: view-transition-group ( persistent-navbar ),
html . home-view-transition :: view-transition-group ( persistent-navbar ),
html . post-view-transition :: view-transition-old ( persistent-navbar ),
html . post-view-transition :: view-transition-new ( persistent-navbar ),
html . home-view-transition :: view-transition-old ( persistent-navbar ),
html . home-view-transition :: view-transition-new ( persistent-navbar ) {
animation : none ;
mix-blend-mode : normal ;
}
html . post-view-transition :: view-transition-old ( root ) {
animation : feedViewFadeOut 0.28 s 0.34 s ease-out both ;
}
html . post-view-transition :: view-transition-new ( root ) {
animation : postSurroundingsReveal 0.24 s 0.56 s ease-out both ;
}
html . post-view-transition :: view-transition-old ( post-expand ) {
animation : none ;
width : 100 % ;
height : 100 % ;
opacity : 0 ;
mix-blend-mode : normal ;
}
html . post-view-transition :: view-transition-new ( post-expand ) {
animation : none ;
width : 100 % ;
height : 100 % ;
opacity : 1 ;
object-fit : fill ;
mix-blend-mode : normal ;
}
html . post-view-transition :: view-transition-old ( post-heading ) {
animation : sharedTitleMorphOut 0.64 s ease-out both ;
}
html . post-view-transition :: view-transition-new ( post-heading ) {
animation : sharedTitleMorphIn 0.64 s ease-out both ;
}
html . post-view-transition :: view-transition-old ( post-time ) {
animation : sharedTimeOut 0.2 s 0.32 s ease-out both ;
}
html . post-view-transition :: view-transition-new ( post-time ) {
animation : sharedTimeIn 0.2 s 0.38 s ease-out both ;
}
html . post-view-transition :: view-transition-old ( post-avatar ),
html . post-view-transition :: view-transition-old ( post-author ),
html . post-view-transition :: view-transition-old ( post-pin-state ),
html . post-view-transition :: view-transition-old ( post-edited-state ) {
animation : sharedPartMorphOut 0.68 s ease-out both ;
}
html . post-view-transition :: view-transition-new ( post-avatar ),
html . post-view-transition :: view-transition-new ( post-author ),
html . post-view-transition :: view-transition-new ( post-pin-state ),
html . post-view-transition :: view-transition-new ( post-edited-state ) {
animation : sharedPartMorphIn 0.68 s ease-out both ;
}
html . post-view-transition :: view-transition-old ( post-feed-actions ) {
animation : feedOnlyPartOut 0.28 s 0.24 s ease-out both ;
}
html . post-view-transition :: view-transition-old ( post-body ) {
animation : none ;
opacity : 0 ;
}
html . post-view-transition :: view-transition-new ( post-body ) {
animation : none ;
opacity : 1 ;
object-fit : none ;
object-position : left top ;
}
html . post-view-transition :: view-transition-old ( post-feed-media ) {
animation : none ;
opacity : 0 ;
}
html . post-view-transition :: view-transition-new ( post-detail-controls ),
html . post-view-transition :: view-transition-new ( post-detail-signature ),
html . post-view-transition :: view-transition-new ( post-detail-media ) {
animation : detailOnlyPartIn 0.22 s 0.62 s ease-out both ;
}
html . post-view-transition :: view-transition-old ( post-sidebar ) {
animation : sharedSidebarOut 0.2 s 0.42 s ease-out both ;
}
html . post-view-transition :: view-transition-new ( post-sidebar ) {
animation : sharedSidebarIn 0.2 s 0.42 s ease-out both ;
}
html . home-view-transition :: view-transition-old ( root ) {
animation : homeSourceFadeOut 0.4 s ease-in both ;
}
html . home-view-transition :: view-transition-new ( root ) {
animation : homeFeedFadeIn 0.5 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-old ( root ) {
animation : homeSourceFadeOut 0.24 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-new ( root ) {
animation : homeFeedFadeIn 0.32 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-group ( post-expand ) {
animation-duration : 0.48 s ;
animation-timing-function : cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
}
html . home-view-transition . returning-home :: view-transition-group ( post-sidebar ),
html . home-view-transition . returning-home :: view-transition-group ( post-heading ),
html . home-view-transition . returning-home :: view-transition-group ( post-time ),
html . home-view-transition . returning-home :: view-transition-group ( post-avatar ),
html . home-view-transition . returning-home :: view-transition-group ( post-author ),
html . home-view-transition . returning-home :: view-transition-group ( post-body ),
html . home-view-transition . returning-home :: view-transition-group ( post-pin-state ),
html . home-view-transition . returning-home :: view-transition-group ( post-edited-state ) {
animation-duration : 0.48 s ;
animation-timing-function : cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
}
html . home-view-transition . returning-home :: view-transition-old ( post-expand ) {
animation : postDetailCollapse 0.24 s 0.12 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-new ( post-expand ) {
animation : postCardFadeIn 0.24 s 0.18 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-old ( post-heading ) {
animation : sharedTitleMorphOut 0.42 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-new ( post-heading ) {
animation : sharedTitleMorphIn 0.42 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-old ( post-time ),
html . home-view-transition . returning-home :: view-transition-old ( post-sidebar ) {
animation : sharedTimeOut 0.14 s 0.24 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-new ( post-time ),
html . home-view-transition . returning-home :: view-transition-new ( post-sidebar ) {
animation : sharedTimeIn 0.14 s 0.26 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-old ( post-avatar ),
html . home-view-transition . returning-home :: view-transition-old ( post-author ),
html . home-view-transition . returning-home :: view-transition-old ( post-pin-state ),
html . home-view-transition . returning-home :: view-transition-old ( post-edited-state ) {
animation : sharedPartMorphOut 0.42 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-new ( post-avatar ),
html . home-view-transition . returning-home :: view-transition-new ( post-author ),
html . home-view-transition . returning-home :: view-transition-new ( post-pin-state ),
html . home-view-transition . returning-home :: view-transition-new ( post-edited-state ) {
animation : sharedPartMorphIn 0.42 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-old ( post-detail-controls ),
html . home-view-transition . returning-home :: view-transition-old ( post-detail-signature ),
html . home-view-transition . returning-home :: view-transition-old ( post-detail-media ) {
animation : feedOnlyPartOut 0.18 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-new ( post-feed-actions ),
html . home-view-transition . returning-home :: view-transition-new ( post-feed-media ) {
animation : detailOnlyPartIn 0.18 s 0.26 s ease-out both ;
}
html . home-view-transition . returning-home :: view-transition-old ( post-body ) {
animation : bodySourceOut 0.1 s 0.35 s ease-out both ;
object-fit : none ;
object-position : left top ;
}
html . home-view-transition . returning-home :: view-transition-new ( post-body ) {
animation : bodyTargetIn 0.1 s 0.38 s ease-out both ;
}
@ keyframes feedViewFadeOut {
to { opacity : 0 ; }
}
@ keyframes postSurroundingsReveal {
from { opacity : 0 ; }
to { opacity : 1 ; }
}
@ keyframes postCardFadeOut {
0 %, 72 % { opacity : 1 ; }
100 % { opacity : 0 ; }
}
@ keyframes postCardReveal {
from { opacity : 0 ; }
to { opacity : 1 ; }
}
@ keyframes homeSourceFadeOut {
to { opacity : 0 ; }
}
@ keyframes homeFeedFadeIn {
from { opacity : 0 ; }
to { opacity : 1 ; }
}
@ keyframes postDetailCollapse {
to { opacity : 0 ; }
}
@ keyframes postCardFadeIn {
from { opacity : 0 ; }
to { opacity : 1 ; }
}
@ keyframes sharedTitleMorphOut {
0 %, 68 % { opacity : 1 ; }
100 % { opacity : 0 ; }
}
@ keyframes sharedTitleMorphIn {
0 %, 62 % { opacity : 0 ; }
100 % { opacity : 1 ; }
}
@ keyframes sharedPartMorphOut {
0 %, 66 % { opacity : 1 ; }
100 % { opacity : 0 ; }
}
@ keyframes sharedPartMorphIn {
0 %, 58 % { opacity : 0 ; }
100 % { opacity : 1 ; }
}
@ keyframes feedOnlyPartOut {
from { opacity : 1 ; }
to { opacity : 0 ; }
}
@ keyframes detailOnlyPartIn {
from { opacity : 0 ; }
to { opacity : 1 ; }
}
@ keyframes bodySourceOut {
from { opacity : 1 ; }
to { opacity : 0 ; }
}
@ keyframes bodyTargetIn {
from { opacity : 0 ; }
to { opacity : 1 ; }
}
@ keyframes sharedTimeOut {
to { opacity : 0.2 ; }
}
@ keyframes sharedTimeIn {
from { opacity : 0.2 ; }
to { opacity : 1 ; }
}
@ keyframes sharedSidebarOut {
to { opacity : 0.72 ; }
}
@ keyframes sharedSidebarIn {
from { opacity : 0.72 ; }
to { opacity : 1 ; }
}
@ keyframes slideIn {
from {
transform : translateX ( 40 px );
opacity : 0.6 ;
}
to {
transform : translateX ( 0 );
opacity : 1 ;
}
}
. page-slide . slide-out {
animation : slideOut 0.25 s cubic-bezier ( 0.55 , 0 , 1 , 0.45 ) forwards ;
}
@ keyframes slideOut {
from {
transform : translateX ( 0 );
opacity : 1 ;
}
to {
transform : translateX ( -40 px );
opacity : 0.5 ;
}
}
. page-header {
display : flex ;
align-items : center ;
gap : 16 px ;
margin-bottom : 24 px ;
padding-bottom : 16 px ;
border-bottom : 1 px solid var ( -- glass - border );
}
. page-header h2 {
font-size : 22 px ;
font-weight : 700 ;
color : var ( -- glass - text );
}
. page-header h2 svg {
margin-right : 10 px ;
color : var ( -- primary );
}
. back-btn {
background : var ( -- glass - bg );
backdrop-filter : blur ( 8 px );
-webkit- backdrop-filter : blur ( 8 px );
border : 1 px solid var ( -- glass - border );
color : var ( -- glass - text - secondary );
cursor : pointer ;
font-size : 14 px ;
padding : 8 px 16 px ;
border-radius : var ( -- radius - sm );
transition : all var ( -- transition );
font-weight : 500 ;
}
. back-btn : hover {
background : rgba ( 255 , 255 , 255 , 0.2 );
color : var ( -- glass - text );
}
. back-btn svg {
margin-right : 6 px ;
}
/* ===== 帖子详情页 ===== */
. post-page-layout {
display : flex ;
gap : 28 px ;
max-width : 1200 px ;
margin : 0 auto ;
width : 100 % ;
align-items : flex-start ;
}
. post-page-main {
flex : 1 ;
min-width : 0 ;
padding-top : 0 ;
}
# postSidebar {
width : 240 px ;
flex-shrink : 0 ;
align-self : start ;
}
. post-page-header {
max-width : 1200 px ;
margin-left : auto ;
margin-right : auto ;
width : 100 % ;
}
# pagePost . post-detail-card {
background : var ( -- glass - bg );
backdrop-filter : blur ( 16 px );
-webkit- backdrop-filter : blur ( 16 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius );
padding : 24 px 28 px ;
box-shadow : var ( -- glass - shadow );
}
# pagePost . post-detail-card . post-content {
font-size : 15 px ;
line-height : 1.7 ;
}
# pagePost . post-detail-card . post-title {
font-size : 22 px ;
}
# pagePost . post-detail-actions {
margin-top : 8 px ;
}
# repliesList {
margin-top : 4 px ;
}
. reply-item {
background : var ( -- glass - bg );
backdrop-filter : blur ( 12 px );
-webkit- backdrop-filter : blur ( 12 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius );
padding : 14 px 18 px ;
margin-bottom : 10 px ;
transition : all var ( -- transition );
box-shadow : var ( -- glass - shadow );
}
. reply-item : hover {
background : rgba ( 255 , 255 , 255 , 0.25 );
}
. reply-header {
display : flex ;
align-items : center ;
gap : 10 px ;
margin-bottom : 6 px ;
}
. reply-avatar {
width : 28 px ;
height : 28 px ;
border-radius : 50 % ;
object-fit : cover ;
border : 2 px solid var ( -- glass - border );
}
. reply-username {
font-weight : 600 ;
font-size : 13 px ;
color : var ( -- glass - text );
}
. reply-time {
font-size : 12 px ;
color : var ( -- glass - text - light );
margin-left : auto ;
}
. reply-content {
font-size : 14 px ;
line-height : 1.7 ;
padding-left : 38 px ;
word-break : break-word ;
color : var ( -- glass - text - secondary );
}
# replyArea {
max-width : 700 px ;
margin-top : 28 px ;
border-top : 1 px solid var ( -- glass - border );
padding-top : 24 px ;
}
# replyArea h3 {
font-size : 16 px ;
font-weight : 600 ;
margin-bottom : 14 px ;
color : var ( -- glass - text );
}
# replyArea h3 svg {
margin-right : 6 px ;
color : var ( -- primary );
}
# replyArea textarea {
width : 100 % ;
padding : 12 px 16 px ;
background : rgba ( 255 , 255 , 255 , 0.1 );
backdrop-filter : blur ( 8 px );
-webkit- backdrop-filter : blur ( 8 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius - sm );
font-size : 14 px ;
font-family : inherit ;
resize : vertical ;
color : var ( -- glass - text );
transition : all var ( -- transition );
}
# replyArea textarea : focus {
outline : none ;
background : rgba ( 255 , 255 , 255 , 0.2 );
border-color : var ( -- primary );
box-shadow : 0 0 0 3 px var ( -- primary - glow );
}
# replyArea textarea :: placeholder {
color : var ( -- glass - text - light );
}
/* ============================================================
管理后台 —— 侧边栏布局(磨砂玻璃风格)
============================================================ */
. admin-layout {
display : flex ;
gap : 24 px ;
max-width : 1200 px ;
margin : 0 auto ;
align-items : flex-start ;
padding-top : 12 px ;
}
. admin-sidebar {
width : 200 px ;
flex-shrink : 0 ;
background : var ( -- glass - bg );
backdrop-filter : blur ( 16 px );
-webkit- backdrop-filter : blur ( 16 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius );
padding : 8 px 0 ;
box-shadow : var ( -- glass - shadow );
position : sticky ;
top : 84 px ;
}
. admin-nav-item {
display : flex ;
align-items : center ;
gap : 10 px ;
padding : 10 px 18 px ;
color : var ( -- glass - text - secondary );
text-decoration : none ;
font-size : 14 px ;
font-weight : 500 ;
transition : all var ( -- transition );
border-left : 3 px solid transparent ;
cursor : pointer ;
}
. admin-nav-item : hover {
background : rgba ( 255 , 255 , 255 , 0.15 );
color : var ( -- glass - text );
}
. admin-nav-item . active {
background : rgba ( 255 , 255 , 255 , 0.2 );
color : var ( -- primary );
border-left-color : var ( -- primary );
}
. admin-nav-item . nav-icon {
display : flex ;
align-items : center ;
justify-content : center ;
width : 24 px ;
flex-shrink : 0 ;
}
. admin-nav-item . nav-icon svg {
width : 18 px ;
height : 18 px ;
stroke : currentColor ;
}
. admin-content {
flex : 1 ;
min-width : 0 ;
background : var ( -- glass - bg );
backdrop-filter : blur ( 16 px );
-webkit- backdrop-filter : blur ( 16 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius );
padding : 20 px 24 px ;
box-shadow : var ( -- glass - shadow );
}
/* ===== 移动端适配:底部导航栏(磨砂玻璃风格) ===== */
@ media ( max-width : 768px ) {
. admin-layout {
flex-direction : column ;
padding-bottom : 70 px ;
}
. admin-sidebar {
position : fixed ;
bottom : 0 ;
left : 0 ;
right : 0 ;
width : 100 % ;
background : var ( -- glass - bg );
backdrop-filter : blur ( 20 px );
-webkit- backdrop-filter : blur ( 20 px );
border-top : 1 px solid var ( -- glass - border );
padding : 4 px 0 env ( safe - area - inset - bottom , 8 px ) 0 ;
z-index : 60 ;
display : flex ;
flex-direction : row !important ;
justify-content : space-around ;
flex-wrap : nowrap ;
box-shadow : 0 -4 px 24 px rgba ( 0 , 0 , 0 , 0.08 );
border : none ;
border-radius : 0 ;
top : auto ;
position : fixed ;
}
. admin-nav {
display : flex ;
width : 100 % ;
justify-content : space-around ;
}
. admin-nav-item {
flex-direction : column ;
gap : 2 px ;
padding : 6 px 8 px ;
font-size : 10 px ;
border : none !important ;
background : transparent !important ;
color : var ( -- glass - text - secondary );
border-radius : 0 ;
align-items : center ;
text-align : center ;
flex : 1 ;
border-left : none !important ;
}
. admin-nav-item . nav-icon {
font-size : 20 px ;
width : auto ;
display : flex ;
justify-content : center ;
}
. admin-nav-item . nav-icon svg {
width : 22 px ;
height : 22 px ;
stroke : var ( -- glass - text - secondary );
transition : stroke 0.2 s ;
}
. admin-nav-item . active {
color : var ( -- primary );
background : transparent !important ;
border-bottom : none !important ;
border-left : none !important ;
}
. admin-nav-item . active . nav-icon svg {
stroke : var ( -- primary );
}
. admin-content {
padding : 16 px 16 px 80 px 16 px ;
}
. admin-sidebar . admin-nav-item {
border : none !important ;
}
}
@ media ( max-width : 480px ) {
. admin-nav-item {
font-size : 9 px ;
padding : 4 px 4 px ;
}
. admin-nav-item . nav-icon svg {
width : 20 px ;
height : 20 px ;
}
/* 手机版帖子操作按钮紧凑排列,避免删除按钮越界 */
. post-actions {
gap : 8 px ;
flex-wrap : wrap ;
}
. post-actions button {
padding : 4 px 4 px ;
}
# feed . post-content {
max-height : 4.25 em ; /* 手机屏约 2.5 行 */
}
}
/* ============================================================
旧有管理后台样式(兼容)
============================================================ */
. admin-tabs {
display : flex ;
gap : 6 px ;
margin-bottom : 24 px ;
border-bottom : 1 px solid var ( -- glass - border );
padding-bottom : 14 px ;
flex-wrap : wrap ;
}
. admin-tab {
padding : 6 px 18 px ;
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius - sm );
background : var ( -- glass - bg );
backdrop-filter : blur ( 8 px );
-webkit- backdrop-filter : blur ( 8 px );
cursor : pointer ;
font-size : 13 px ;
font-weight : 500 ;
color : var ( -- glass - text - secondary );
transition : all var ( -- transition );
}
. admin-tab : hover {
background : rgba ( 255 , 255 , 255 , 0.2 );
color : var ( -- glass - text );
}
. admin-tab . active {
background : rgba ( 255 , 255 , 255 , 0.3 );
color : var ( -- glass - text );
border-color : var ( -- primary );
box-shadow : 0 2 px 8 px var ( -- primary - glow );
}
. admin-tab svg {
margin-right : 6 px ;
}
. report-item {
background : var ( -- glass - bg );
backdrop-filter : blur ( 12 px );
-webkit- backdrop-filter : blur ( 12 px );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius - sm );
padding : 16 px 20 px ;
margin-bottom : 10 px ;
box-shadow : var ( -- glass - shadow );
transition : all var ( -- transition );
}
. report-item : hover {
background : rgba ( 255 , 255 , 255 , 0.25 );
}
. report-item . report-actions {
margin-top : 10 px ;
display : flex ;
gap : 8 px ;
flex-wrap : wrap ;
}
# adminContent table {
width : 100 % ;
border-collapse : collapse ;
font-size : 14 px ;
background : var ( -- glass - bg );
backdrop-filter : blur ( 12 px );
-webkit- backdrop-filter : blur ( 12 px );
border-radius : var ( -- radius );
overflow : hidden ;
box-shadow : var ( -- glass - shadow );
}
# adminContent th {
text-align : left ;
padding : 12 px 16 px ;
background : rgba ( 255 , 255 , 255 , 0.1 );
font-weight : 600 ;
color : var ( -- glass - text - secondary );
border-bottom : 1 px solid var ( -- glass - border );
}
# adminContent td {
padding : 10 px 16 px ;
border-bottom : 1 px solid rgba ( 255 , 255 , 255 , 0.05 );
color : var ( -- glass - text );
}
# adminContent tr : last-child td {
border-bottom : none ;
}
# adminContent tr : hover td {
background : rgba ( 255 , 255 , 255 , 0.05 );
}
/* ===== 自定义页面容器 ===== */
# customPageContainer {
display : none ;
}
/* ===== 响应式(保持原有) ===== */
@ media ( max-width : 768px ) {
. sidebar {
display : none ;
}
# app {
padding : 16 px ;
}
# navbar {
padding : 0 16 px ;
}
. modal-content {
padding : 24 px 20 px ;
}
. feed-header {
flex-direction : column ;
align-items : stretch ;
}
. feed-header-left {
display : flex ;
gap : 4 px ;
width : 100 % ;
}
. tab {
flex : 1 ;
text-align : center ;
padding : 6 px 12 px ;
font-size : 13 px ;
}
. fab-btn {
width : 100 % ;
justify-content : center ;
}
. post-card {
padding : 14 px 16 px ;
}
. post-page-layout {
display : block ;
}
. post-page-main {
padding-top : 0 ;
}
. post-image {
max-width : 120 px ;
max-height : 100 px ;
}
. page-slide {
padding : 80 px 16 px 20 px ;
}
. post-detail-card {
padding : 16 px !important ;
}
. reply-content {
padding-left : 0 ;
}
. reply-header . reply-time {
font-size : 10 px ;
}
. page-header h2 {
font-size : 18 px ;
}
}
@ media ( max-width : 480px ) {
. forum-name {
font-size : 17 px ;
}
. btn-primary ,
. btn-ghost {
padding : 6 px 14 px ;
font-size : 13 px ;
}
. modal-content {
padding : 20 px 16 px ;
}
. post-actions {
gap : 12 px ;
font-size : 12 px ;
flex-wrap : wrap ;
}
# customNavLinks a {
font-size : 12 px !important ;
padding : 2 px 6 px !important ;
}
}
/* ===== 暗色模式下的特殊修复 ===== */
[ data-theme = "dark" ] . modal-content input ,
[ data-theme = "dark" ] . modal-content textarea ,
[ data-theme = "dark" ] . modal-content select {
background : rgba ( 255 , 255 , 255 , 0.06 );
}
[ data-theme = "dark" ] . modal-content input : focus ,
[ data-theme = "dark" ] . modal-content textarea : focus ,
[ data-theme = "dark" ] . modal-content select : focus {
background : rgba ( 255 , 255 , 255 , 0.12 );
}
[ data-theme = "dark" ] . post-card {
background : var ( -- glass - bg );
}
[ data-theme = "dark" ] . post-card : hover {
background : rgba ( 255 , 255 , 255 , 0.12 );
}
[ data-theme = "dark" ] . stats-box ,
[ data-theme = "dark" ] . links-box {
background : var ( -- glass - bg );
}
[ data-theme = "dark" ] . stats-box : hover ,
[ data-theme = "dark" ] . links-box : hover {
background : rgba ( 255 , 255 , 255 , 0.08 );
}
[ data-theme = "dark" ] . reply-item {
background : var ( -- glass - bg );
}
[ data-theme = "dark" ] . reply-item : hover {
background : rgba ( 255 , 255 , 255 , 0.08 );
}
[ data-theme = "dark" ] . dropdown-menu {
background : var ( -- glass - bg );
}
[ data-theme = "dark" ] . dropdown-menu a : hover {
background : rgba ( 255 , 255 , 255 , 0.08 );
}
[ data-theme = "dark" ] . tab . active {
color : #fff ;
}
[ data-theme = "dark" ] . admin-tab {
background : var ( -- glass - bg );
}
[ data-theme = "dark" ] . admin-tab : hover {
background : rgba ( 255 , 255 , 255 , 0.08 );
}
[ data-theme = "dark" ] . admin-tab . active {
background : rgba ( 255 , 255 , 255 , 0.15 );
color : #fff ;
}
[ data-theme = "dark" ] # adminContent table {
background : var ( -- glass - bg );
}
[ data-theme = "dark" ] # adminContent th {
background : rgba ( 255 , 255 , 255 , 0.05 );
}
[ data-theme = "dark" ] # navbar {
background : var ( -- glass - bg );
}
[ data-theme = "dark" ] . page-slide {
background : linear-gradient ( 145 deg , var ( -- bg - start ) 0 % , var ( -- bg - end ) 100 % );
}
[ data-theme = "dark" ] # replyArea textarea {
background : rgba ( 255 , 255 , 255 , 0.06 );
}
[ data-theme = "dark" ] # replyArea textarea : focus {
background : rgba ( 255 , 255 , 255 , 0.1 );
}
[ data-theme = "dark" ] . btn-ghost {
background : rgba ( 255 , 255 , 255 , 0.05 );
}
[ data-theme = "dark" ] . btn-ghost : hover {
background : rgba ( 255 , 255 , 255 , 0.12 );
}
[ data-theme = "dark" ] . captcha-row span {
background : rgba ( 255 , 255 , 255 , 0.08 );
}
[ data-theme = "dark" ] . captcha-row span : hover {
background : rgba ( 255 , 255 , 255 , 0.15 );
}
[ data-theme = "dark" ] . btn-secondary {
background : var ( -- glass - bg );
}
[ data-theme = "dark" ] . btn-secondary : hover {
background : rgba ( 255 , 255 , 255 , 0.12 );
}
[ data-theme = "dark" ] . post-card . post-actions button : hover {
background : rgba ( 255 , 255 , 255 , 0.08 );
}
[ data-theme = "dark" ] . post-card . post-actions . action-delete : hover {
background : rgba ( 239 , 68 , 68 , 0.2 );
}
[ data-theme = "dark" ] . report-item {
background : var ( -- glass - bg );
}
[ data-theme = "dark" ] . report-item : hover {
background : rgba ( 255 , 255 , 255 , 0.06 );
}
[ data-theme = "dark" ] . modal-content {
background : var ( -- glass - bg );
}
[ data-theme = "dark" ] . admin-sidebar {
background : #181826 ;
border-color : var ( -- glass - border );
}
[ data-theme = "dark" ] . admin-nav-item : hover {
background : rgba ( 255 , 255 , 255 , 0.08 );
}
[ data-theme = "dark" ] . admin-nav-item . active {
background : rgba ( 255 , 255 , 255 , 0.12 );
color : var ( -- primary );
}
[ data-theme = "dark" ] . admin-nav-item . nav-icon svg {
stroke : var ( -- glass - text - secondary );
}
[ data-theme = "dark" ] . admin-nav-item . active . nav-icon svg {
stroke : var ( -- primary );
}
[ data-theme = "dark" ] . admin-content {
background : #181826 ;
border-color : var ( -- glass - border );
}
[ data-theme = "dark" ] . admin-sidebar {
border : 1 px solid var ( -- glass - border );
}
[ data-theme = "dark" ] . feed-header-left :: after {
background : rgba ( 255 , 255 , 255 , 0.08 );
}
/* ============================================================
暗色模式 - 设置页面修复
============================================================ */
[ data-theme = "dark" ] # pageSettings . settings-card ,
[ data-theme = "dark" ] # pageSettings > div > div ,
[ data-theme = "dark" ] # pageSettings [ style *= "background:var(--surface)" ] {
background : var ( -- glass - bg ) !important ;
border-color : var ( -- glass - border ) !important ;
}
[ data-theme = "dark" ] # pageSettings input ,
[ data-theme = "dark" ] # pageSettings textarea ,
[ data-theme = "dark" ] # pageSettings select {
background : rgba ( 255 , 255 , 255 , 0.06 ) !important ;
color : var ( -- glass - text ) !important ;
border-color : var ( -- glass - border ) !important ;
}
[ data-theme = "dark" ] # pageSettings input : focus ,
[ data-theme = "dark" ] # pageSettings textarea : focus ,
[ data-theme = "dark" ] # pageSettings select : focus {
background : rgba ( 255 , 255 , 255 , 0.12 ) !important ;
border-color : var ( -- primary ) !important ;
}
/* ============================================================
私信模态框 —— 亮色模式修复
============================================================ */
/* 亮色模式下私信列表模态框 + 聊天模态框 */
[ data-theme = "light" ] # messageListModal . modal-content ,
[ data-theme = "light" ] # chatModal . modal-content {
background : #ffffff !important ;
backdrop-filter : none !important ;
-webkit- backdrop-filter : none !important ;
border : 1 px solid #e9edf4 !important ;
box-shadow : 0 24 px 80 px rgba ( 0 , 0 , 0 , 0.12 ) !important ;
}
/* 亮色模式下的关闭按钮 */
[ data-theme = "light" ] # messageListModal . modal-content . close ,
[ data-theme = "light" ] # chatModal . modal-content . close {
color : #4a4a6a !important ;
}
[ data-theme = "light" ] # messageListModal . modal-content . close : hover ,
[ data-theme = "light" ] # chatModal . modal-content . close : hover {
color : #1a1a2e !important ;
}
/* 亮色模式下的标题 */
[ data-theme = "light" ] # messageListModal . modal-content h2 ,
[ data-theme = "light" ] # chatModal . modal-content h2 {
color : #1a1a2e !important ;
}
/* 亮色模式下的私信列表项 */
[ data-theme = "light" ] # messageListContent . message-list-item {
background : #f6f8fc !important ;
border-bottom : 1 px solid #e9edf4 !important ;
}
[ data-theme = "light" ] # messageListContent . message-list-item : hover {
background : #eef2ff !important ;
}
/* 亮色模式下的聊天消息容器 */
[ data-theme = "light" ] # chatMessages {
background : #f6f8fc !important ;
border-radius : 8 px ;
}
/* 亮色模式下的聊天输入框 */
[ data-theme = "light" ] # chatInput {
background : #ffffff !important ;
border : 1 px solid #e9edf4 !important ;
color : #1a1a2e !important ;
}
[ data-theme = "light" ] # chatInput : focus {
border-color : var ( -- primary ) !important ;
box-shadow : 0 0 0 3 px var ( -- primary - glow ) !important ;
}
[ data-theme = "light" ] # chatInput :: placeholder {
color : #8a8aaa !important ;
}
/* 暗色模式保持原样(不覆盖) */
/* ============================================================
自定义 CSS 警告模态框 —— 亮色模式文字修复
============================================================ */
/* 亮色模式下警告模态框文字变深 */
[ data-theme = "light" ] . modal-content h2 ,
[ data-theme = "light" ] . modal-content p ,
[ data-theme = "light" ] . modal-content strong {
color : #1a1a2e !important ;
}
[ data-theme = "light" ] . modal-content p {
color : #4a4a6a !important ;
}
/* ============================================================
自定义 CSS 按钮 —— 亮色模式修复
============================================================ */
/* 亮色模式:删除自定义 CSS 按钮 */
[ data-theme = "light" ] # customCssDeleteBtn {
background : #f1f3f5 !important ;
border : 1 px solid #e9edf4 !important ;
color : #1a1a2e !important ;
}
[ data-theme = "light" ] # customCssDeleteBtn : hover {
background : #e9ecef !important ;
}
/* 亮色模式:警告模态框里的取消按钮 */
[ data-theme = "light" ] # cssWarningCancel {
background : #f1f3f5 !important ;
border : 1 px solid #e9edf4 !important ;
color : #1a1a2e !important ;
}
[ data-theme = "light" ] # cssWarningCancel : hover {
background : #e9ecef !important ;
}
/* ============================================================
亮色模式 - 设置页面修复
============================================================ */
[ data-theme = "light" ] # pageSettings . settings-card ,
[ data-theme = "light" ] # pageSettings > div > div ,
[ data-theme = "light" ] # pageSettings [ style *= "background:var(--surface)" ] {
background : rgba ( 255 , 255 , 255 , 0.5 ) !important ;
backdrop-filter : blur ( 16 px ) !important ;
-webkit- backdrop-filter : blur ( 16 px ) !important ;
border : 1 px solid rgba ( 255 , 255 , 255 , 0.6 ) !important ;
box-shadow : 0 8 px 32 px rgba ( 0 , 0 , 0 , 0.06 ) !important ;
}
[ data-theme = "light" ] # pageSettings input ,
[ data-theme = "light" ] # pageSettings textarea ,
[ data-theme = "light" ] # pageSettings select {
background : rgba ( 255 , 255 , 255 , 0.4 ) !important ;
backdrop-filter : blur ( 8 px ) !important ;
-webkit- backdrop-filter : blur ( 8 px ) !important ;
border : 1 px solid rgba ( 255 , 255 , 255 , 0.5 ) !important ;
color : #1a1a2e !important ;
}
[ data-theme = "light" ] # pageSettings input : focus ,
[ data-theme = "light" ] # pageSettings textarea : focus ,
[ data-theme = "light" ] # pageSettings select : focus {
background : rgba ( 255 , 255 , 255 , 0.6 ) !important ;
border-color : var ( -- primary ) !important ;
box-shadow : 0 0 0 3 px var ( -- primary - glow ) !important ;
}
[ data-theme = "light" ] # pageSettings input :: placeholder ,
[ data-theme = "light" ] # pageSettings textarea :: placeholder {
color : #8a8aaa !important ;
}
/* ============================================================
删除按钮 —— 微红背景版
============================================================ */
/* 帖子卡片的删除按钮 */
. post-actions . action-delete {
background : rgba ( 239 , 68 , 68 , 0.08 ) !important ;
border : 1.5 px solid #ef4444 !important ;
color : #1a1a2e !important ;
padding : 2 px 10 px !important ;
border-radius : var ( -- radius - sm ) !important ;
transition : all 0.2 s ease !important ;
}
. post-actions . action-delete : hover {
background : #ef4444 !important ;
color : #fff !important ;
}
/* 帖子详情页的删除按钮 */
# detailDeleteBtn {
background : rgba ( 239 , 68 , 68 , 0.08 ) !important ;
border : 1.5 px solid #ef4444 !important ;
color : #1a1a2e !important ;
padding : 2 px 10 px !important ;
border-radius : var ( -- radius - sm ) !important ;
transition : all 0.2 s ease !important ;
}
# detailDeleteBtn : hover {
background : #ef4444 !important ;
color : #fff !important ;
}
/* 暗色模式下适配 */
[ data-theme = "dark" ] . post-actions . action-delete ,
[ data-theme = "dark" ] # detailDeleteBtn {
background : rgba ( 239 , 68 , 68 , 0.15 ) !important ;
color : #e8e8f0 !important ;
}
[ data-theme = "dark" ] . post-actions . action-delete : hover ,
[ data-theme = "dark" ] # detailDeleteBtn : hover {
background : #ef4444 !important ;
color : #fff !important ;
}
/* ============================================================
用户个人主页 —— 卡片样式覆盖
============================================================ */
/* 用户主页的主卡片 */
# userProfileContent > div : first-child {
background : var ( -- glass - bg ) !important ;
backdrop-filter : blur ( 16 px ) !important ;
-webkit- backdrop-filter : blur ( 16 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
border-radius : var ( -- radius ) !important ;
box-shadow : var ( -- glass - shadow ) !important ;
padding : 32 px !important ;
transition : all var ( -- transition ) !important ;
}
/* 用户主页的帖子卡片(复用帖子流样式) */
# userProfileContent . post-card {
background : var ( -- glass - bg ) !important ;
backdrop-filter : blur ( 16 px ) !important ;
-webkit- backdrop-filter : blur ( 16 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
border-radius : var ( -- radius ) !important ;
box-shadow : var ( -- glass - shadow ) !important ;
transition : all var ( -- transition ) !important ;
}
# userProfileContent . post-card : hover {
background : rgba ( 255 , 255 , 255 , 0.28 ) !important ;
transform : translateY ( -2 px ) !important ;
box-shadow : var ( -- glass - shadow - hover ) !important ;
}
/* 亮色模式下稍微实一点,避免太透 */
[ data-theme = "light" ] # userProfileContent > div : first-child {
background : rgba ( 255 , 255 , 255 , 0.5 ) !important ;
}
/* 暗色模式下保持原样 */
[ data-theme = "dark" ] # userProfileContent > div : first-child {
background : var ( -- glass - bg ) !important ;
}
/* ============================================================
用户下拉菜单 —— 统一卡片玻璃风格
============================================================ */
/* 亮色模式 */
[ data-theme = "light" ] . dropdown-menu {
background : var ( -- glass - bg ) !important ;
backdrop-filter : blur ( 20 px ) !important ;
-webkit- backdrop-filter : blur ( 20 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
box-shadow : var ( -- glass - shadow ) !important ;
}
/* 暗色模式 */
[ data-theme = "dark" ] . dropdown-menu {
background : var ( -- glass - bg ) !important ;
backdrop-filter : blur ( 20 px ) !important ;
-webkit- backdrop-filter : blur ( 20 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
box-shadow : var ( -- glass - shadow ) !important ;
}
/* 菜单项悬浮效果 */
. dropdown-menu a : hover {
background : rgba ( 0 , 0 , 0 , 0.04 ) !important ;
}
[ data-theme = "dark" ] . dropdown-menu a : hover {
background : rgba ( 255 , 255 , 255 , 0.08 ) !important ;
}
/* ============================================================
用户下拉菜单 —— 半透明(比卡片稍实)
============================================================ */
/* 亮色模式 */
[ data-theme = "light" ] . dropdown-menu {
background : rgba ( 255 , 255 , 255 , 0.75 ) !important ;
backdrop-filter : blur ( 16 px ) !important ;
-webkit- backdrop-filter : blur ( 16 px ) !important ;
border : 1 px solid rgba ( 255 , 255 , 255 , 0.6 ) !important ;
box-shadow : 0 8 px 32 px rgba ( 0 , 0 , 0 , 0.08 ) !important ;
}
/* 暗色模式 */
[ data-theme = "dark" ] . dropdown-menu {
background : rgba ( 30 , 30 , 50 , 0.80 ) !important ;
backdrop-filter : blur ( 16 px ) !important ;
-webkit- backdrop-filter : blur ( 16 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
box-shadow : var ( -- glass - shadow ) !important ;
}
/* 菜单项悬浮效果 */
. dropdown-menu a : hover {
background : rgba ( 0 , 0 , 0 , 0.05 ) !important ;
}
[ data-theme = "dark" ] . dropdown-menu a : hover {
background : rgba ( 255 , 255 , 255 , 0.08 ) !important ;
}
/* ============================================================
回复删除按钮 —— 统一风格
============================================================ */
/* 回复列表里的删除按钮 */
. reply-delete-btn {
background : rgba ( 239 , 68 , 68 , 0.08 ) !important ;
border : 1.5 px solid #ef4444 !important ;
color : #1a1a2e !important ;
padding : 2 px 10 px !important ;
border-radius : var ( -- radius - sm ) !important ;
transition : all 0.2 s ease !important ;
font-size : 12 px !important ;
font-weight : 500 !important ;
cursor : pointer !important ;
}
. reply-delete-btn : hover {
background : #ef4444 !important ;
color : #fff !important ;
}
/* 暗色模式适配 */
[ data-theme = "dark" ] . reply-delete-btn {
background : rgba ( 239 , 68 , 68 , 0.15 ) !important ;
color : #e8e8f0 !important ;
}
[ data-theme = "dark" ] . reply-delete-btn : hover {
background : #ef4444 !important ;
color : #fff !important ;
}
/* ============================================================
超链接颜色修复 —— 只影响内容里的链接
============================================================ */
/* 内容区域里的链接(帖子、回复、详情页) */
. post-content a ,
. reply-content a ,
. post-detail-card a ,
# pagePost . post-content a ,
# pagePost . reply-content a {
color : var ( -- primary ) !important ;
text-decoration : underline !important ;
text-underline-offset : 2 px ;
transition : color 0.2 s ease ;
}
. post-content a : hover ,
. reply-content a : hover ,
. post-detail-card a : hover ,
# pagePost . post-content a : hover ,
# pagePost . reply-content a : hover {
color : var ( -- primary - hover ) !important ;
}
/* 已访问链接不变紫 */
. post-content a : visited ,
. reply-content a : visited ,
. post-detail-card a : visited ,
# pagePost . post-content a : visited ,
# pagePost . reply-content a : visited {
color : var ( -- primary ) !important ;
}
/* 暗色模式下 */
[ data-theme = "dark" ] . post-content a ,
[ data-theme = "dark" ] . reply-content a ,
[ data-theme = "dark" ] . post-detail-card a ,
[ data-theme = "dark" ] # pagePost . post-content a ,
[ data-theme = "dark" ] # pagePost . reply-content a {
color : var ( -- primary - light ) !important ;
}
[ data-theme = "dark" ] . post-content a : visited ,
[ data-theme = "dark" ] . reply-content a : visited ,
[ data-theme = "dark" ] . post-detail-card a : visited ,
[ data-theme = "dark" ] # pagePost . post-content a : visited ,
[ data-theme = "dark" ] # pagePost . reply-content a : visited {
color : var ( -- primary - light ) !important ;
}
/* 导航栏、下拉菜单、按钮里的 a 标签 —— 不要下划线 */
# navbar a ,
. dropdown-menu a ,
. admin-nav a ,
. admin-nav-item ,
. back-btn ,
. btn-ghost ,
. btn-primary ,
. btn-secondary ,
. btn-danger ,
. btn-success ,
. btn-sm ,
a . btn-ghost ,
a . btn-primary ,
a . btn-secondary {
text-decoration : none !important ;
}
/* ============================================================
帖子列表 —— 内容截断(纯 CSS)
============================================================ */
# feed . post-content {
position : relative ;
max-height : 5.1 em ; /* 约 3 行(line-height 1.7) */
overflow : hidden ;
line-height : 1.7 ;
}
/* 长帖:文字越往下越透明(渐变消失,无背景色块) */
# feed . post-content . has-fade {
-webkit- mask-image : linear-gradient ( 180 deg , #000 55 % , transparent 100 % );
mask-image : linear-gradient ( 180 deg , #000 55 % , transparent 100 % );
}
/* ===== 全屏加载页 ===== */
. loading-screen {
position : fixed ;
inset : 0 ;
z-index : 99999 ;
display : flex ;
align-items : center ;
justify-content : center ;
background : linear-gradient ( 145 deg , var ( -- bg - start ) 0 % , var ( -- bg - end ) 100 % );
transition : background var ( -- transition );
}
. loading-inner {
display : flex ;
flex-direction : column ;
align-items : center ;
gap : 16 px ;
}
/* 论坛名收到后淡入出现 */
. loading-title-appear {
animation : titleFadeIn 0.6 s ease-out ;
}
@ keyframes titleFadeIn {
from { opacity : 0 ; transform : translateY ( 4 px ); }
to { opacity : 1 ; transform : translateY ( 0 ); }
}
. loading-spinner {
width : 44 px ;
height : 44 px ;
border : 4 px solid var ( -- border );
border-top-color : var ( -- primary );
border-radius : 50 % ;
animation : spin 0.8 s linear infinite ;
}
. loading-title {
font-size : 20 px ;
font-weight : 700 ;
color : var ( -- text );
}
. loading-sub {
font-size : 13 px ;
color : var ( -- text - light );
}
@ keyframes spin {
to { transform : rotate ( 360 deg ); }
}
/* ===== 主界面淡入(初始化完成) ===== */
. app-fade-in {
animation : appFadeIn 0.4 s ease-out ;
}
@ keyframes appFadeIn {
from { opacity : 0 ; }
to { opacity : 1 ; }
}
/* ===== Markdown 渲染样式 ===== */
. post-content code ,
. reply-content code {
background : rgba ( 91 , 155 , 213 , 0.12 );
padding : 2 px 6 px ;
border-radius : 4 px ;
font-size : 0.9 em ;
font-family : ui-monospace , SFMono-Regular , Menlo , Consolas , monospace ;
color : var ( -- glass - text );
}
. post-content pre {
background : rgba ( 15 , 15 , 26 , 0.75 );
border : 1 px solid var ( -- glass - border );
border-radius : var ( -- radius - sm );
padding : 12 px 14 px ;
overflow-x : auto ;
margin : 10 px 0 ;
}
. post-content pre code {
background : none ;
padding : 0 ;
color : #e8e8f0 ;
}
. post-content blockquote {
border-left : 3 px solid var ( -- primary );
margin : 10 px 0 ;
padding : 4 px 14 px ;
color : var ( -- glass - text - secondary );
background : rgba ( 91 , 155 , 213 , 0.08 );
border-radius : 0 var ( -- radius - sm ) var ( -- radius - sm ) 0 ;
}
. post-content img {
max-width : 100 % ;
border-radius : var ( -- radius - sm );
}
. post-content ul ,
. post-content ol {
padding-left : 24 px ;
margin : 8 px 0 ;
}
. post-content table {
border-collapse : collapse ;
margin : 10 px 0 ;
}
. post-content th ,
. post-content td {
border : 1 px solid var ( -- glass - border );
padding : 6 px 12 px ;
}
. post-content h1 ,
. post-content h2 ,
. post-content h3 ,
. post-content h4 {
margin : 14 px 0 8 px ;
color : var ( -- glass - text );
}
. post-content hr {
border : none ;
border-top : 1 px solid var ( -- glass - border );
margin : 14 px 0 ;
}
/* ============================================================
管理后台 —— 表格撑满(同步上游)
============================================================ */
# adminContent {
width : 100 % !important ;
max-width : 100 % !important ;
}
# adminContent table {
width : 100 % !important ;
min-width : 100 % !important ;
table-layout : auto !important ;
}
# adminContent th ,
# adminContent td {
white-space : nowrap !important ;
}
# adminContent td : first-child ,
# adminContent td : nth-child ( 2 ) {
white-space : normal !important ;
}
/* ===== Toast 通知(右上角,替代 alert) ===== */
. toast-container {
position : fixed ;
top : 20 px ;
right : 20 px ;
z-index : 100000 ;
display : flex ;
flex-direction : column ;
gap : 10 px ;
pointer-events : none ;
}
. toast {
pointer-events : auto ;
min-width : 200 px ;
max-width : 340 px ;
padding : 12 px 18 px ;
border-radius : 10 px ;
font-size : 14 px ;
font-weight : 500 ;
color : var ( -- glass - text );
border : 1 px solid var ( -- glass - border );
box-shadow : 0 8 px 32 px rgba ( 0 , 0 , 0 , 0.2 );
backdrop-filter : blur ( 12 px );
-webkit- backdrop-filter : blur ( 12 px );
cursor : pointer ;
animation : toastIn 0.25 s cubic-bezier ( 0.22 , 1 , 0.36 , 1 );
display : flex ;
align-items : center ;
gap : 8 px ;
}
. toast-success {
background : rgba ( 255 , 255 , 255 , 0.85 );
border-color : #22c55e ;
}
. toast-error {
background : rgba ( 255 , 255 , 255 , 0.85 );
border-color : #ef4444 ;
}
. toast-warning {
background : rgba ( 255 , 255 , 255 , 0.85 );
border-color : #f59e0b ;
}
. toast-success svg {
color : #22c55e ;
}
. toast-error svg {
color : #ef4444 ;
}
. toast-warning svg {
color : #f59e0b ;
}
[ data-theme = "dark" ] . toast {
background : rgba ( 30 , 30 , 50 , 0.85 );
}
. toast . closing {
animation : toastOut 0.22 s ease-in forwards ;
}
@ keyframes toastIn {
from { opacity : 0 ; transform : translateX ( 24 px ); }
to { opacity : 1 ; transform : translateX ( 0 ); }
}
@ keyframes toastOut {
from { opacity : 1 ; transform : translateX ( 0 ); }
to { opacity : 0 ; transform : translateX ( 24 px ); }
}
. modal . closing {
display : flex ;
animation : modalFadeOut 0.32 s ease-in forwards ;
pointer-events : none ;
}
@ keyframes modalFadeOut {
from { opacity : 1 ; }
to { opacity : 0 ; }
}
. modal . closing . modal-content {
animation : modalContentOut 0.32 s cubic-bezier ( 0.4 , 0 , 1 , 1 ) forwards ;
}
@ keyframes modalContentOut {
from { transform : translateY ( 0 ) scale ( 1 ); opacity : 1 ; }
to { transform : translateY ( 12 px ) scale ( 0.9 ); opacity : 0 ; }
}
. feedback-confirm {
z-index : 100001 ;
}
. feedback-confirm . modal-content {
max-width : 440 px ;
background : var ( -- modal - bg );
}
. feedback-confirm . modal-content p {
color : var ( -- glass - text - secondary );
line-height : 1.6 ;
overflow-wrap : anywhere ;
}
. feedback-confirm-actions {
display : flex ;
justify-content : flex-end ;
gap : 10 px ;
margin-top : 24 px ;
}
. feedback-confirm-actions button {
border-radius : var ( -- radius - sm );
padding : 9 px 18 px ;
cursor : pointer ;
}
. feedback-confirm-actions . btn-danger {
border : 1 px solid rgba ( 239 , 68 , 68 , 0.5 );
background : #dc2626 ;
color : #fff ;
}
/* 设置页面侧边栏导航项 */
. settings-nav-item {
display : flex ;
align-items : center ;
gap : 10 px ;
padding : 10 px 18 px ;
color : var ( -- glass - text - secondary );
text-decoration : none ;
font-size : 14 px ;
font-weight : 500 ;
transition : all var ( -- transition );
border-left : 3 px solid transparent ;
cursor : pointer ;
}
. settings-nav-item : hover {
background : rgba ( 255 , 255 , 255 , 0.15 );
color : var ( -- glass - text );
}
. settings-nav-item . active {
background : rgba ( 255 , 255 , 255 , 0.2 );
color : var ( -- primary );
border-left-color : var ( -- primary );
}
. settings-nav-item . nav-icon {
display : flex ;
align-items : center ;
justify-content : center ;
width : 24 px ;
flex-shrink : 0 ;
}
. settings-nav-item . nav-icon svg {
width : 18 px ;
height : 18 px ;
stroke : currentColor ;
}
/* 设置页面侧边栏容器 */
. settings-layout {
max-width : none !important ;
margin-left : 0 !important ;
margin-right : 0 !important ;
}
. settings-sidebar {
background : var ( -- glass - bg ) !important ;
backdrop-filter : blur ( 16 px ) !important ;
-webkit- backdrop-filter : blur ( 16 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
border-radius : var ( -- radius ) !important ;
padding : 8 px 0 !important ;
box-shadow : var ( -- glass - shadow ) !important ;
position : sticky ;
top : 84 px ;
}
/* 设置页面内容区 */
. settings-content {
flex : 1 1 0 ;
width : calc ( 100 % - 228 px ) !important ;
max-width : none !important ;
min-width : 0 ;
overflow-wrap : anywhere ;
background : var ( -- glass - bg ) !important ;
backdrop-filter : blur ( 16 px ) !important ;
-webkit- backdrop-filter : blur ( 16 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
border-radius : var ( -- radius ) !important ;
padding : 20 px 24 px !important ;
box-shadow : var ( -- glass - shadow ) !important ;
}
. settings-content > *,
. settings-content [ data-panel ] {
max-width : 100 % ;
min-width : 0 ;
}
. language-toggle {
width : 220 px ;
max-width : 100 % ;
}
. language-toggle . tab {
min-width : 0 ;
white-space : nowrap ;
}
@ media ( max-width : 768px ) {
. settings-layout {
flex-direction : column ;
gap : 12 px !important ;
}
. settings-sidebar {
position : static ;
width : 100 % !important ;
}
. settings-nav {
display : flex ;
width : 100 % ;
}
. settings-nav-item {
flex : 1 1 0 ;
min-width : 0 ;
justify-content : center ;
padding : 8 px 6 px ;
border-left : 0 ;
border-bottom : 3 px solid transparent ;
text-align : center ;
white-space : normal ;
}
. settings-nav-item . active {
border-left-color : transparent ;
border-bottom-color : var ( -- primary );
/* 手机端选中 tab:仅左上/右上圆角(桌面端保持直角不变) */
border-top-left-radius : 8 px ;
border-top-right-radius : 8 px ;
}
. settings-content {
width : 100 % !important ;
}
}
/* 设置页面内部卡片 */
. settings-content [ style *= "background:var(--surface)" ] {
background : rgba ( 255 , 255 , 255 , 0.08 ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
border-radius : var ( -- radius - sm ) !important ;
backdrop-filter : blur ( 8 px ) !important ;
-webkit- backdrop-filter : blur ( 8 px ) !important ;
}
/* 设置页面输入框 */
. settings-content input ,
. settings-content textarea ,
. settings-content select {
background : rgba ( 255 , 255 , 255 , 0.12 ) !important ;
backdrop-filter : blur ( 8 px ) !important ;
-webkit- backdrop-filter : blur ( 8 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
border-radius : var ( -- radius - sm ) !important ;
color : var ( -- glass - text ) !important ;
padding : 8 px 12 px !important ;
font-size : 14 px !important ;
font-family : inherit !important ;
transition : all var ( -- transition ) !important ;
width : 100 % !important ;
}
. settings-content input : focus ,
. settings-content textarea : focus ,
. settings-content select : focus {
outline : none !important ;
background : rgba ( 255 , 255 , 255 , 0.25 ) !important ;
border-color : var ( -- primary ) !important ;
box-shadow : 0 0 0 3 px var ( -- primary - glow ) !important ;
}
. settings-content input :: placeholder ,
. settings-content textarea :: placeholder {
color : var ( -- glass - text - light ) !important ;
}
/* 设置页面按钮 */
. settings-content . btn-secondary {
background : var ( -- glass - bg ) !important ;
backdrop-filter : blur ( 8 px ) !important ;
-webkit- backdrop-filter : blur ( 8 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
color : var ( -- glass - text - secondary ) !important ;
}
. settings-content . btn-secondary : hover {
background : rgba ( 255 , 255 , 255 , 0.2 ) !important ;
color : var ( -- glass - text ) !important ;
}
. settings-content . btn-primary {
background : var ( -- glass - bg ) !important ;
backdrop-filter : blur ( 12 px ) !important ;
-webkit- backdrop-filter : blur ( 12 px ) !important ;
border : 1 px solid var ( -- glass - border ) !important ;
color : var ( -- glass - text ) !important ;
}
. settings-content . btn-primary : hover {
background : rgba ( 255 , 255 , 255 , 0.25 ) !important ;
}
/* 设置页面头像边框 */
. settings-content img [ style *= "border-radius:50%" ] {
border-color : var ( -- glass - border ) !important ;
}
/* 暗色模式适配 */
[ data-theme = "dark" ] . settings-sidebar {
background : #181826 !important ;
border-color : var ( -- glass - border ) !important ;
}
[ data-theme = "dark" ] . settings-nav-item : hover {
background : rgba ( 255 , 255 , 255 , 0.08 ) !important ;
}
[ data-theme = "dark" ] . settings-nav-item . active {
background : rgba ( 255 , 255 , 255 , 0.12 ) !important ;
color : var ( -- primary ) !important ;
}
[ data-theme = "dark" ] . settings-nav-item . nav-icon svg {
stroke : var ( -- glass - text - secondary );
}
[ data-theme = "dark" ] . settings-nav-item . active . nav-icon svg {
stroke : var ( -- primary );
}
[ data-theme = "dark" ] . settings-content {
background : #181826 !important ;
border-color : var ( -- glass - border ) !important ;
}
[ data-theme = "dark" ] . settings-content input ,
[ data-theme = "dark" ] . settings-content textarea ,
[ data-theme = "dark" ] . settings-content select {
background : rgba ( 255 , 255 , 255 , 0.06 ) !important ;
color : var ( -- glass - text ) !important ;
border-color : var ( -- glass - border ) !important ;
}
/* 详情页两列布局需要压过页面尾部的通用卡片与响应式覆盖。 */
# pagePost . post-page-layout {
display : flex !important ;
gap : 28 px !important ;
width : 100 % !important ;
max-width : 1200 px !important ;
margin : 0 auto !important ;
align-items : start !important ;
}
# pagePost # postSidebar {
display : block !important ;
width : 240 px !important ;
min-width : 240 px !important ;
flex : 0 0 240 px !important ;
align-self : start !important ;
}
# pagePost . post-page-main {
display : block !important ;
flex : 1 1 0 !important ;
width : 100 % !important ;
min-width : 0 !important ;
}
@ media ( max-width : 768px ) {
# pagePost . post-page-layout {
display : block !important ;
max-width : none !important ;
}
# pagePost # postSidebar {
display : none !important ;
}
# pagePost . post-page-main {
width : 100 % !important ;
}
}
/* ===== 小转圈(列表/局部加载) ===== */
. spinner-sm {
display : inline-block ;
width : 18 px ;
height : 18 px ;
border : 2 px solid var ( -- glass - border );
border-top-color : var ( -- primary );
border-radius : 50 % ;
animation : spin 0.8 s linear infinite ;
vertical-align : -3 px ;
margin-right : 8 px ;
}
@ keyframes spin {
to { transform : rotate ( 360 deg ); }
}
/* ===== 评论抽屉(平滑展开/收起) ===== */
. replies-drawer {
display : grid ;
grid-template-rows : 0 fr ;
transition : grid-template-rows 0.45 s cubic-bezier ( 0.22 , 1 , 0.36 , 1 );
overflow : hidden ;
}
. replies-drawer . open {
grid-template-rows : 1 fr ;
}
. replies-drawer > . replies-drawer-inner {
overflow : hidden ;
min-height : 0 ;
}
. replies-toggle {
display : inline-flex ;
align-items : center ;
gap : 6 px ;
background : none ;
border : none ;
color : var ( -- primary );
font-size : 14 px ;
cursor : pointer ;
padding : 6 px 10 px ;
border-radius : 6 px ;
transition : background 0.2 s ;
}
. replies-toggle : hover {
background : var ( -- primary - bg );
}
. replies-toggle . chev {
transition : transform 0.35 s cubic-bezier ( 0.22 , 1 , 0.36 , 1 );
}
. replies-toggle . open . chev {
transform : rotate ( 180 deg );
}
/* ===== 窄屏:帖子操作按钮整行换行(避免图标/文字拆行) ===== */
@ media ( max-width : 640px ) {
. post-header {
flex-wrap : wrap ;
}
. post-detail-controls {
margin-left : 0 ;
width : 100 % ;
justify-content : flex-end ;
flex-wrap : wrap ;
}
. post-detail-controls . btn-sm {
padding : 4 px 8 px ;
font-size : 12 px ;
white-space : nowrap ;
}
}
/* ===== 回复操作按钮(邮件回复风格) ===== */
. reply-btn {
background : none ;
border : none ;
cursor : pointer ;
padding : 4 px 6 px ;
border-radius : 4 px ;
color : var ( -- text - light );
opacity : 0.5 ;
transition : opacity 0.15 s , background 0.15 s , color 0.15 s ;
display : inline-flex ;
align-items : center ;
justify-content : center ;
margin-left : 4 px ;
}
. reply-btn : hover {
opacity : 1 ;
background : var ( -- glass - bg );
color : var ( -- primary );
}
/* 触屏设备:始终全透明 */
@ media ( hover : none ) {
. reply-btn { opacity : 0.8 ; }
}
/* ===== 回复指示器(Discourse 风格:正在回复 @xxx) ===== */
. reply-to-indicator {
display : inline-flex ;
align-items : center ;
gap : 4 px ;
margin-top : 4 px ;
font-size : 12 px ;
color : var ( -- text - light );
cursor : pointer ;
transition : color 0.15 s ;
}
. reply-to-indicator . icon {
stroke : var ( -- text - light );
}
. reply-to-indicator : hover {
color : var ( -- primary );
}
. reply-to-indicator strong {
color : var ( -- primary );
font-weight : 600 ;
}