/**
 * CC 登录左侧动画样式（与 cc-login-standalone 参考一致）
 */

.auth-sidebar.auth-login-template-cc .cc-ccl-left {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	padding: 2rem;
	padding-top: max(2rem, env(safe-area-inset-top, 0px) + 0.5rem);
	padding-left: max(1rem, env(safe-area-inset-left, 0px));
	padding-right: max(1rem, env(safe-area-inset-right, 0px));
	background: transparent;
	position: relative;
	overflow: hidden;
}

.auth-sidebar.auth-login-template-cc .cc-ccl-right {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 2.5rem 2rem;
	padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px) + 1.25rem);
	background: transparent;
}

.auth-sidebar.auth-login-template-cc .cc-ccl-right-inner {
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
}

.auth-sidebar.auth-login-template-cc .cc-ccl-mobile-logo {
	display: none;
	flex-direction: row;
	align-items: center;
	gap: 0.65rem;
	margin-bottom: 1.5rem;
	max-width: 100%;
}

.auth-sidebar.auth-login-template-cc .cc-ccl-h1 {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 0.35rem;
	color: var(--auth-text, #171717);
}

.auth-sidebar.auth-login-template-cc .cc-ccl-sub {
	margin: 0 0 1.75rem;
	color: var(--auth-text-muted, #737373);
	font-size: 0.9375rem;
}

/* 插画容器：窄屏下配合缩放，避免占满半屏 */
.auth-sidebar.auth-login-template-cc .cc-anim-scaler {
	width: 100%;
	max-width: 550px;
	margin-inline: auto;
}

/* 动画舞台（与原版 550×400 一致） */
.auth-sidebar.auth-login-template-cc .cc-anim {
	position: relative;
	width: 100%;
	max-width: 550px;
	height: 400px;
	margin-inline: auto;
}

/* height / transform 均由 JS 插值；字形用大字 ITCG，容器裁切防溢出 */
.auth-sidebar.auth-login-template-cc .cc-char {
	position: absolute;
	bottom: 0;
	overflow: hidden;
	container-type: size;
	container-name: cc-char;
	transform-origin: bottom center;
	will-change: transform;
	backface-visibility: hidden;
}

/* 四色对应 ITCG 字母造型（字重 900，与站点品牌一致） */
.auth-sidebar.auth-login-template-cc .cc-char-glyph {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: 100%;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-weight: 900;
	font-style: normal;
	line-height: 0.82;
	letter-spacing: -0.05em;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	font-size: 88cqh;
}

@supports not (font-size: 1cqh) {
	.auth-sidebar.auth-login-template-cc .cc-char-glyph {
		font-size: clamp(140px, 36vw, 260px);
	}
}

/* 参考稿：I 天蓝 · T 橙 · C/G 深灰 */
.auth-sidebar.auth-login-template-cc .cc-purple .cc-char-glyph {
	color: var(--cc-i, #38bdf8);
}

.auth-sidebar.auth-login-template-cc .cc-orange .cc-char-glyph {
	color: var(--cc-t, #ff9b6b);
}

/* C 单独略加粗：字重已是 900，用同色描边加厚笔画（G 用下方规则，不加描边） */
.auth-sidebar.auth-login-template-cc .cc-black .cc-char-glyph {
	color: var(--cc-c, #2d2d2d);
	-webkit-text-stroke: min(0.042em, 3.5px) var(--cc-stroke, #2d2d2d);
	paint-order: stroke fill;
}

.auth-sidebar.auth-login-template-cc .cc-yellow .cc-char-glyph {
	color: var(--cc-g, #2d2d2d);
}

/*
 * 四字水平排布：C 相对 T 右移，减轻 T 竖/横笔与 C 左缘挤在一起。
 * I(4–30) · T(30–53) · C(43–63) · G(58–97)。
 * I、T 整体左移 80px（与百分比 left 叠加）。
 */
.auth-sidebar.auth-login-template-cc .cc-purple {
	left: calc(4% - 80px);
	width: 26%;
	height: 400px;
	z-index: 5;
	background: transparent;
}

/*
 * I：字形为底对齐大字；脸层锚在竖条上缘内侧。
 */
.auth-sidebar.auth-login-template-cc .cc-purple .cc-face--purple {
	top: 33%;
	left: 0;
	width: 100%;
	z-index: 2;
	align-items: flex-start;
	justify-content: center;
	gap: 0.32rem;
	padding-top: 0;
}

/* T：参考稿无眼睛（相对原 30% 左移 80px 后再右移 30px → net -50px） */
.auth-sidebar.auth-login-template-cc .cc-orange {
	left: calc(30% - 50px);
	width: 23%;
	height: 248px;
	z-index: 3;
	background: transparent;
}

.auth-sidebar.auth-login-template-cc .cc-face--no-eyes {
	display: none !important;
}

/* Black：倾斜锚点在底部靠左（挨紫色一侧） */
.auth-sidebar.auth-login-template-cc .cc-black {
	left: 43%;
	width: 20%;
	height: 305px;
	z-index: 2;
	background: transparent;
	transform-origin: 22% 100%;
}

/*
 * C：眼位略靠上弧；G 单独下移一点，避免贴在 G 字顶边。
 */
.auth-sidebar.auth-login-template-cc .cc-black .cc-face--black,
.auth-sidebar.auth-login-template-cc .cc-yellow .cc-face--yellow {
	left: 50%;
	margin-left: -17px;
	right: auto;
	width: max-content;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	flex-wrap: nowrap;
}

/* C：眼睛贴在开口上沿黑色笔画上，勿落在字心留白处 */
.auth-sidebar.auth-login-template-cc .cc-black .cc-face--black {
	top: 20%;
}

.auth-sidebar.auth-login-template-cc .cc-yellow .cc-face--yellow {
	top: 35%;
}

/* G：最右，略大于 C 的字形高度以平衡视觉 */
.auth-sidebar.auth-login-template-cc .cc-yellow {
	left: 58%;
	width: 39%;
	height: 300px;
	z-index: 4;
	background: transparent;
}

.auth-sidebar.auth-login-template-cc .cc-black-mouth {
	position: absolute;
	left: 0;
	top: 0;
	width: 14px;
	height: 4px;
	border-radius: 0 0 10px 10px;
	background: var(--cc-mouth, #fff);
	/* 由 JS 按张嘴度设置；默认隐藏，避免闭嘴时仍显示成白圆点 */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	will-change: transform, height, width;
	backface-visibility: hidden;
	transform-origin: 50% 0;
}

.auth-sidebar.auth-login-template-cc .cc-face {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 1;
	will-change: transform;
	backface-visibility: hidden;
}

.auth-sidebar.auth-login-template-cc .cc-face--purple,
.auth-sidebar.auth-login-template-cc .cc-face--black {
	display: flex;
	align-items: center;
}

.auth-sidebar.auth-login-template-cc .cc-face--purple {
	gap: 2rem;
}

.auth-sidebar.auth-login-template-cc .cc-face--black {
	gap: 1.5rem;
}

.auth-sidebar.auth-login-template-cc .cc-face--orange {
	display: flex;
	align-items: center;
	gap: 2rem;
}

/* 带眼白的眼睛 */
.auth-sidebar.auth-login-template-cc .cc-eyeball {
	border-radius: 50%;
	background: #fff;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: height 0.15s ease-out, width 0.15s ease-out;
}

.auth-sidebar.auth-login-template-cc .cc-eyeball--tiny {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.auth-sidebar.auth-login-template-cc .cc-eyeball.is-blinking {
	height: 2px !important;
	min-height: 0;
}

/* 偷看：眼睛略鼓（黑块勾选显示密码偷瞄时） */
.auth-sidebar.auth-login-template-cc .cc-eyeball.is-peek-pop:not(.is-blinking) {
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
	filter: brightness(1.06);
}

/* 登录成功：高兴弯眼 */
.auth-sidebar.auth-login-template-cc .cc-eyeball.is-mood-happy:not(.is-blinking) {
	border-radius: 50% 50% 45% 45%;
	box-shadow: 0 2px 0 rgba(255, 255, 255, 0.35);
	filter: brightness(1.08);
}

/* 登录失败：鄙视眯眼 */
.auth-sidebar.auth-login-template-cc .cc-eyeball.is-mood-judge:not(.is-blinking) {
	transform: scaleY(0.72);
	filter: brightness(0.92);
}

.auth-sidebar.auth-login-template-cc .cc-eyeball-pupil {
	border-radius: 50%;
	background: #2d2d2d;
	display: block;
	will-change: transform;
	/* 不用 transition：与鼠标同步才丝滑 */
}

/* 仅瞳孔（橙 / 黄） */
.auth-sidebar.auth-login-template-cc .cc-pupil-solo {
	border-radius: 50%;
	background: #2d2d2d;
	display: inline-block;
	will-change: transform;
}

/* 主题登录页：左侧与右侧共用登录页背景，无独立白底 */
.auth-sidebar.auth-login-template-cc {
	background: var(--bg-secondary);
	padding: 0;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
}

.auth-sidebar.auth-login-template-cc::before {
	display: none;
}

/*
 * 移动端：舞台固定设计比例 550×400。勿使用「宽度 100% + 高度 400px」，否则会变窄长高比失调、字形横向挤压。
 * 使用 aspect-ratio + 字母高度百分比，与桌面像素稿等比例缩放。
 */
@media (max-width: 900px) {
	.auth-sidebar.auth-login-template-cc .cc-ccl-left {
		min-height: 0;
		min-width: 0;
		padding: 0.75rem 0.75rem 0.875rem;
		padding-top: max(0.75rem, env(safe-area-inset-top, 0px) + 0.25rem);
	}

	.auth-sidebar.auth-login-template-cc .cc-anim-scaler {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		max-width: min(100%, 550px);
		min-width: 0;
		margin-inline: auto;
		height: auto;
		max-height: none;
		overflow: visible;
	}

	/* 避免 flex 子项默认 stretch 把舞台拉高压扁；宽度用 min 保持 550:400 */
	.auth-sidebar.auth-login-template-cc .cc-anim {
		width: min(100%, 550px);
		max-width: 550px;
		height: auto;
		aspect-ratio: 550 / 400;
		flex: 0 0 auto;
		align-self: center;
		margin-inline: auto;
		min-width: 0;
	}

	.auth-sidebar.auth-login-template-cc .cc-purple {
		height: 100%;
	}

	.auth-sidebar.auth-login-template-cc .cc-orange {
		height: 62%;
	}

	.auth-sidebar.auth-login-template-cc .cc-black {
		height: 76.25%;
	}

	.auth-sidebar.auth-login-template-cc .cc-yellow {
		height: 75%;
	}
}

@media (max-width: 480px) {
	.auth-sidebar.auth-login-template-cc .cc-ccl-left {
		padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
		padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
	}
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
	.auth-sidebar.auth-login-template-cc .cc-ccl-left {
		min-height: 0;
		padding-top: 0.5rem;
		padding-bottom: 0.5rem;
	}

	.auth-sidebar.auth-login-template-cc .cc-anim-scaler {
		max-width: min(100%, 480px);
	}

	.auth-sidebar.auth-login-template-cc .cc-anim {
		max-width: min(100%, 480px);
	}
}
