/* Theme Name: VINCENT
Theme URI: https://www.shaowenhao.com
Author: SHAOWENHAO
Author URI: https://www.shaowenhao.com
Description: Designed & Powered By shaowenhao.com
Version: v2.1 @2025.11
License: Designed & Powered By shaowenhao.com
License URI: https://www.shaowenhao.com/about
Tags: VINCENT
Text Domain: SHAOWENHAO  */


html{
	-webkit-text-size-adjust: 100%;
	min-width: 23.4em;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	background-color: #ffffff;
	font-size: 16px;
	letter-spacing: 0.02em;
	word-break: break-word; 
	text-rendering: optimizeLegibility;

	/* 系统字体组合，兼顾中英日 */
	font-family:
		/* 中文 */
		"PingFang SC",          /* macOS 中文 */
		"Microsoft YaHei",      /* Windows 中文 */
		"WenQuanYi Micro Hei",  /* Linux 中文开源 */
		"Noto Sans CJK SC",     /* 多平台统一中文（已安装可用） */

		/* 日文 */
		"Hiragino Kaku Gothic Pro", /* macOS 日文 */
		"Yu Gothic",                /* Windows 日文 */
		"Meiryo",                   /* Windows 日文 */

		/* 英文 / 国际字符 */
		"Segoe UI",      /* Windows 英文界面字体 */
		"Helvetica Neue",/* macOS 英文 */
		"Arial",         /* 通用英文 */
		sans-serif;      /* 兜底 */
}

a, a:link, a:visited, a:hover, a:active {
	color: black;
	text-decoration: none;
}

#topBar{
	display: flex;
	width: 100%;
	padding: 0.1em 0em;
	background-color: black;
	/*position:fixed;
	z-index: 99;*/
	box-shadow: 0em 0.1em 0.1em grey;
}

#topBar form{
	width: fit-content;
	margin: 0.5em auto;
}

#topBar input{
	width: 100%;
	line-height: 1.8em; 
	text-align: center;
	vertical-align: middle;
	border-radius: 1em;
	-webkit-appearance: none; /*safari*/
	appearance: none;
	padding: 0em 0em 0em 1em;
}

#main{
	width: 100%;
	max-width: 45em;
	margin: 0em auto;
	word-break: break-all;
}

#main_index{
	width: 100%;
	max-width: 75em;
	margin: 0em auto;
	word-break: break-all;
}

#header{
	display: flex;
	width: -webkit-fill-available;
	width: -moz-available;
	margin: 4em 0em 2em 0em;
	justify-content: center;
	flex-direction: column;
	align-items: center;
}

#header #bloglogo{
	padding-bottom: 1em;
}

#header #blogInfo{
	text-align: center;
}

#bloglogo img {
	width: 6em;
	border-radius: 50%;
	overflow: hidden;
	float: left;
	transition: transform 1s ease-out;
	box-shadow: 0.1em 0.1em 0.2em grey;
}

#bloglogo img:hover {
	box-shadow: 0.1em 0.1em 0.3em gray;
}

#blogInfo{
	margin-left: 1em;
	display: flex;
	align-items: center; /* 垂直居中 */
}

#blogname{
	font-size: 1.6em;
	font-weight: bold;
	display: inherit;
}

#blogdescription{
	font-size: 0.7em;
	padding-top: 0.1em;
	display: inherit;
}

.showInLine{
	white-space: nowrap; /* 确保文本在一行内显示 */
	overflow: hidden; /* 隐藏超出容器的内容 */
	text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
}

#nav{
	display: flex;
	/* 计算宽度：父容器100%宽度 - 左右各1em的间距 */
	width: calc(100% - 2em);
	/* 上下间距保持1em，左右auto实现水平居中，同时保留了左右1em的实际间距 */
	margin: 1em auto;
	border-radius: 0.8em;
	background-color: rgb(233, 232, 232);
	box-shadow: 0.1em 0.1em 0.3em grey;
	max-width: 40em;
	box-sizing: border-box;
}

#navItem{
	width: 25%;
	text-align: center;
	font-weight: bold;
	border-radius: 0.8em;
	padding: 0.5em 0em;
	float: left;
}

#navItem:hover{
	background-color: rgb(173, 173, 173);
	box-shadow: 0.1em 0.1em 0.1em grey;
}

a[aria-current="page"]{
	background-color: rgb(37, 37, 37);
	color: white;
	float: left;
	width: 100%;
	padding: 0.5em 0em;
	border-radius: 0.8em;
	margin: -0.5em 0em;
}

#content{
	width: -webkit-fill-available;
	width: -moz-available;
	margin: 2em;
	float: left;
	
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18em, 1fr));
	grid-template-rows: masonry;
	gap: 2em;
	align-items: start; 
}

#post{
	width: 100%;
	height: fit-content;
	display: flex;
}

#postContent{
	padding: 0.8em 0.8em;
	white-space: nowrap;
	overflow: hidden;
	box-shadow: 0.15em 0.15em 0.5em grey;
	border-radius: 0.3em;
}

#content_title{
	width: 90%;
	font-size: 1em;
	font-weight: bold;
	padding-top: 0.7em;
}

#content_author{
	color: grey;
	font-size: 0.7em;
	padding-top: 0.3em;
}

#content_excerpt{
	font-size: 0.8em;
	padding: 1em 4em 0em 0.2em;
	color: dimgrey;
}

#content_img img{
	overflow: hidden;
	border-radius: 0.3em;
	width: 100%;
	transition-timing-function: ease-in-out;
	transition: transform 0.5s;
}

#postInfo{
	font-size: 0.7em;
	padding: 1.5em 0.7em 1em 0em;
	text-align: right;
}

#page{
	display: flex;
	width: -webkit-fill-available;
	width: -moz-available;
	margin: 1em 0em 2em 0em;
	justify-content: center;
	float: left;
}

.page-numbers{
	border: solid;
	border-radius: 0.5em;
	border-width: 1px;
	padding: 0.35em 0.6em;
	border-color: black;
}

.page-numbers:hover{
	background-color: black;
	color: white;
}

.current{
	background-color: grey;
	border-color: grey;
	color: white;
}

#footer{
	width: -webkit-fill-available;
	width: -moz-available;
	margin: 1em 0em;
	color: gray;
	font-size: 0.6em;
	float: left;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

#gotoTop{
	display: none;
	position: fixed;
	right: 2%;
	bottom: 5%;
	cursor: pointer;
	padding: 0.4em 0.2em;
	width: 1.5em;
	text-align: center;
	border: 0.1em solid #e0e0e0;
	background: #fff;
	border-radius: 0.5em;
	line-height: 1.5em;
}

#gotoTop.hover{
	background: black;
	color: #fff;
	text-decoration: none;
}

/* single */
#header_single{
	display: flex;
	width: -webkit-fill-available;
	width: -moz-available;
	margin: 3em 2em 1em 2em;
}

#header_single #bloglogo img {
	width: 5em;
}

#single_title{
	font-size: 1.6em;
	font-weight: bold;
	float: left;
	width: -webkit-fill-available;
	width: -moz-available;
	margin: 1em 1.5em 0em 1.7em;
}

#single_ohterInfo{
	color: grey;
	font-size: 0.7em;
	margin: 0.5em 0em 1em 4.1em;
	float: left;
	width: -webkit-fill-available;
	width: -moz-available;
	border-left: solid;
	border-width: 0.3em;
	border-color: black;
	padding-left: 0.5em;
}

#single_image{
	float: left;
	width: -webkit-fill-available;
	width: -moz-available;
}

#single_content, #comments{
	float: left;
	width: -webkit-fill-available;
	width: -moz-available;
	margin: 1em 3em;
}

#single_content img{
	max-width: -webkit-fill-available;
	max-width: -moz-available;
	transition-timing-function: ease-in-out;
	transition: transform 1s;
	height: auto;
}

#single_content img:hover, video:hover{ 
	transform: scale(1.03);
	border-radius: 0.6em !important;
	box-shadow: 0.3em 0.3em 0.6em grey;
}

#single_content img:active{ 
	transform: scale(2);
}

#show_QR{
	margin: 2em 0em;
	width: 100%;
	text-align: center;
	font-weight: bold;
	float: left;
}

#show_QR img{
	border-color: black;
	border-style: solid;
	border-radius: 1em;
	padding: 0.6em;
	border-width: 0.1875em;
	margin-bottom: 0.625em;

}

@media only screen and (max-width: 1124px) {
	#index{
		display: none;
	}
	
	#index_ad{
		display: none;
	}
}

@media screen and (min-width: 1124px) {
	#index{
		position: fixed;
		width: 13%;
		max-width: 20em;
		min-width: 9em;
		max-height: 70vh;
		overflow-y: auto;
		top: 50%;
		left: 0.5em;
		transform: translate(0, -50%);
		padding: 0.5em 1em 1.5em 0.5em;
		border-left-width: 0.4em;
		border-left-color: black;
		border-left-style: solid;
		font-size: 0.9em;
		background-color: rgb(117, 117, 117, 0.1);
	}

	#index_ad{
		position: fixed;
		width: 13%;
		max-width: 20em;
		min-width: 9em;
		max-height: 70vh;
		overflow-y: auto;
		top: 50%;
		right: 0.5em;
		transform: translate(0, -50%);
		padding: 0.5em 1em 1.5em 0.5em;
		border-left-width: 0.4em;
		border-left-color: black;
		border-left-style: solid;
		font-size: 0.9em;
		background-color: rgb(117, 117, 117, 0.1);
	}
}

/*页面样式*/
#page_infoDetails{
	float: left;
	margin: 1.2em 0em 0em 1em;
}

#comments{
	border-top: dashed 0.2em gray;
	padding-top: 2em;
}

#comments td{
	border-width: 0em;
}

#post_comments{
	text-align: center;
	margin: 1em 0em 3em 0em;
}

#post_comments input, textarea{
	border-radius: 0.5em;
}

#post_comments_name{
	width: -webkit-fill-available;
	width: -moz-available;
	line-height: 1.5em;
	resize: none;
	overflow: hidden;
}

#post_comments_comment{
	width: -webkit-fill-available;
	width: -moz-available;
	min-height: 4.3em;
	max-height: 12.5em;
	line-height: 1.5em;
	resize: none;
	overflow: hidden;
}

.btnStyle{
	background-color: grey;
	border: none;
	border-radius: 1.5em;
	color: whitesmoke;
	font-weight: bolder;
	padding: 0.6em 1.2em;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 1em;
	margin: 0.5em;
	cursor: pointer;
	transition-duration: 0.4s;
}

.btnStyle:hover{
	background-color: #b1b1b1;
	box-shadow: 0.3em 0.3em 0.6em grey;
}

.btnStyle:active{
	background-color: #b1b1b1;
	transform: translateY(0.15em);
}

.post_input{
	width: -webkit-fill-available;
	width: -moz-available;
	line-height: 1.5em;
	resize: none;
	overflow: hidden;
}

mark {
	background-color: yellow;
	font-weight: bold; 
	padding: 0.2em;
}

/* 广告位 */
#ad{
	width: -webkit-fill-available;
	width: -moz-available;
	margin-top: 2em;
	border-top-width: 0.1em;
	border-top-color: grey;
	border-top-style: solid;
}

#ad img{
	width: -webkit-fill-available;
	width: -moz-available;
	padding: 0em 0.5em 0em 0em;
}

#ad img:hover{ 
	transform: scale(1);
	border-radius: 0em !important;
	box-shadow: 0em 0em 0em grey;
}

#ad img:active{ 
	transform: scale(1);
}

/* 录项高亮样式 */
.index-item.active .index-link {
	color: orangered;
	font-weight: 600;
}

/* 适配固定头部 */
:target {
	scroll-margin-top: 70px; /* 固定头部高度+10px余量*/
}


/* 适配自动夜间模式 */

/* 基础变量（白天默认） */
:root {
	--bg-color: #ffffff;
	--text-color: #111111;
	--subtext-color: #666666;
	--card-bg: #ffffff;
	--border-color: #e0e0e0;
	--nav-bg: rgb(233, 232, 232);
	--nav-hover: rgb(173, 173, 173);
	--shadow-color: rgba(0, 0, 0, 0.15);
	--link-color: #000000;
	--accent-color: #000000;
}

/* 夜间模式（系统暗色自动触发） */
@media (prefers-color-scheme: dark) {
	:root {
		/* 护眼型深色方案（非纯黑） */
		--bg-color: #121212;
		--text-color: #e6e6e6;
		--subtext-color: #aaaaaa;
		--card-bg: #1c1c1c;
		--border-color: #2a2a2a;
		--nav-bg: #1e1e1e;
		--nav-hover: #2a2a2a;
		--shadow-color: rgba(0, 0, 0, 0.6);
		--link-color: #e6e6e6;
		--accent-color: #ffffff;
	}
}

/* 全局应用 */

body {
	background-color: var(--bg-color);
	color: var(--text-color);
	transition: background-color 0.4s ease, color 0.4s ease;
}

a, a:link, a:visited, a:hover, a:active {
	color: var(--link-color);
	text-decoration: none;
}

/* 顶部栏 / 导航 */

#topBar {
	background-color: #1a1a1a; 
	box-shadow: none;
	border-bottom: 1px solid #2a2a2a;
}

#topBar input {
	background-color: #222222;
	color: #e6e6e6;
	border: 1px solid #2f2f2f;
}

#topBar input:focus {
	outline: none;
	border-color: #444444;
	background-color: #242424;
}

#topBar, 
#topBar a {
	color: #cccccc;
}

#nav {
	background-color: var(--nav-bg);
	box-shadow: 0.1em 0.1em 0.3em var(--shadow-color);
}

#navItem:hover {
	background-color: var(--nav-hover);
}

a[aria-current="page"] {
	background-color: var(--accent-color);
	color: var(--bg-color);
}

/*  卡片 / 列表内容 */

#postContent {
	background-color: var(--card-bg);
	box-shadow: 0.15em 0.15em 0.5em var(--shadow-color);
	color: var(--text-color);
}

/* 标题层级 */
#content_title,
#single_title,
h1, h2, h3 {
	color: var(--text-color);
}

/* 副信息 */
#content_author,
#postInfo,
#single_ohterInfo,
#footer,
#content_excerpt {
	color: var(--subtext-color);
}

/* 分页 / 边框 */

.page-numbers {
	border-color: var(--accent-color);
	color: var(--text-color);
}

.page-numbers:hover {
	background-color: var(--accent-color);
	color: var(--bg-color);
}

.current {
	background-color: #555555;
	border-color: #555555;
	color: #ffffff;
}

#comments {
	border-top: dashed 0.2em var(--border-color);
}

/* 输入框 / 表单 */

input, textarea {
	background-color: var(--card-bg);
	color: var(--text-color);
	border: 1px solid var(--border-color);
}

/* 夜间图片舒适处理 */

@media (prefers-color-scheme: dark) {
	img, video {
		filter: brightness(0.9) contrast(0.95);
		transition: filter 0.3s ease;
	}
}

/* 夜间弱化阴影 */

@media (prefers-color-scheme: dark) {
	* {
		box-shadow: none !important;
	}

	#postContent,
	#nav,
	#bloglogo img {
		box-shadow: 0 0 0 1px var(--border-color) !important;
	}
}

/* 返回顶部按钮 */

#gotoTop {
	background: var(--card-bg);
	color: var(--text-color);
	border-color: var(--border-color);
}

#gotoTop:hover {
	background: var(--accent-color);
	color: var(--bg-color);
}
