* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
}

h1 {
	margin-bottom: 20px;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game {
	width: 100%;
	max-width: 375px;
	display: flex;
	justify-content: center;
}

.game-container {
	width: 100%;
	padding-bottom: 228%;
	box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
	border-radius: 8px;
	user-select: none;
	position: relative;
}

.game-container::before {
	content: '';
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/bg-1.png') no-repeat;
	background-size: cover;
	pointer-events: none;
}

.game-container::after {
	content: '';
	display: block;
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 13.58%;
	background: url('../img/bgb-2.png') no-repeat;
	background-size: cover;
	pointer-events: none;
	z-index: 199;
}

.game-container.winter::before {
	background: url('../img/bg-12.png') no-repeat;
	background-size: cover;
}

.game-container.winter::after {
	background: url('../img/bgb-22.png') no-repeat;
	background-size: cover;
}

.game-bgImg {
	width: 100%;
}

.game-bgImg img {
	width: 100%;
	height: auto;
	display: block;
}

.game-content {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.game-stage {
	width: 100%;
	height: 40.9356725%;
	overflow: hidden;
	position: relative;
}

.game-stage::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/cao.png') bottom no-repeat;
	background-size: 100% auto;
	pointer-events: none;
}

.game-container.winter .game-stage::after {
	background: url('../img/cao2.png') bottom no-repeat;
	background-size: 100% auto;
}

.game-animals {
	width: 100%;
	height: 100%;
	position: relative;
}

.animal-ostrich {
	position: absolute;
	bottom: 20%;
	right: 100%;
	width: 80px;
	height: 0;
	padding-bottom: calc(260 / (2070 / 9) * 80px);
	animation: ostrich 7s forwards ease-in-out;
}

.animal-ostrich::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/ostrich.png');
	background-size: 900% 100%;
	animation: ostrich1 1s steps(9) infinite;
}

@keyframes ostrich {
	to {
		right: -80px;
	}
}

@keyframes ostrich1 {
	from {
		background-position: 0 0;
	}
	to {
		background-position: -900% 0;
	}
}

.animal-zebra {
	position: absolute;
	bottom: 20%;
	right: 100%;
	width: 110px;
	height: 0;
	padding-bottom: calc(300 / (2560 / 8) * 110px);
	animation: zebra 8s forwards ease-out;
}

.animal-zebra::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/zebra.png');
	background-size: 800% 100%;
	animation: zebra1 0.6s steps(8) infinite;
}

@keyframes zebra {
	to {
		right: -110px;
	}
}

@keyframes zebra1 {
	from {
		background-position: 0 0;
	}
	to {
		background-position: -800% 0;
	}
}

.animal-deer {
	position: absolute;
	bottom: 20%;
	right: 100%;
	width: 90px;
	height: 0;
	padding-bottom: calc(370 / (2080 / 8) * 90px);
	animation: deer 7s forwards ease-out;
}

.animal-deer::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/deer.png');
	background-size: 800% 100%;
	animation: deer1 1s steps(8) infinite;
}

@keyframes deer {
	to {
		right: -90px;
	}
}

@keyframes deer1 {
	from {
		background-position: 0 0;
	}
	to {
		background-position: -800% 0;
	}
}

.animal-elephant {
	position: absolute;
	bottom: 20%;
	right: 100%;
	width: 162px;
	height: 0;
	padding-bottom: calc(360 / (7050 / 15) * 162px);
	animation: elephant 6s forwards ease-out;
}

.animal-elephant::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/elephant.png');
	background-size: 1500% 100%;
	animation: elephant1 1s steps(15) infinite;
}

@keyframes elephant {
	to {
		right: -162px;
	}
}

@keyframes elephant1 {
	from {
		background-position: 0 0;
	}
	to {
		background-position: -1500% 0;
	}
}

.animal-lion {
	position: absolute;
	bottom: 20%;
	right: 100%;
	width: 100px;
	height: 0;
	padding-bottom: calc(220 / (4650 / 15) * 100px);
	animation: lion 5s forwards ease-out;
}

.animal-lion::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/lion.png');
	background-size: 1500% 100%;
	animation: lion1 0.9s steps(15) infinite;
}

@keyframes lion {
	to {
		right: -100px;
	}
}

@keyframes lion1 {
	from {
		background-position: 0 0;
	}
	to {
		background-position: -1500% 0;
	}
}

.animal-bear {
	position: absolute;
	bottom: 20%;
	right: 100%;
	width: 120px;
	height: 0;
	padding-bottom: calc(64 / (1960 / 16) * 120px);
	animation: bear 8s forwards ease-out;
}

.animal-bear::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/bear.png');
	background-size: 1600% 100%;
	animation: bear1 0.8s steps(16) infinite;
}

@keyframes bear {
	to {
		right: -120px;
	}
}

@keyframes bear1 {
	from {
		background-position: 0 0;
	}
	to {
		background-position: -1600% 0;
	}
}

.animal-buffalo {
	position: absolute;
	bottom: 20%;
	right: 100%;
	width: 120px;
	height: 0;
	padding-bottom: calc(210 / (4950 / 15) * 120px);
	animation: buffalo 3s forwards ease-out;
}

.animal-buffalo::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/buffalo.png');
	background-size: 1500% 100%;
	animation: buffalo1 0.8s steps(15) infinite;
}

@keyframes buffalo {
	to {
		right: -120px;
	}
}

@keyframes buffalo1 {
	from {
		background-position: 0 0;
	}
	to {
		background-position: -1500% 0;
	}
}

.game-user {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	border-radius: 24px;
	padding: 3px 12px 3px 3px;
	z-index: 200;
	backdrop-filter: blur(2px);
	transition: transform 0.1s;
	background: url(../img/score.png) no-repeat;
	background-size: 100% auto;
	background-position-y: -28px;
}

.game-user:active {
	transform: scale(0.98);
}

.game-user .user-avatar {
	width: 35px;
	height: 35px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
	flex-shrink: 0;
	cursor: pointer;
}

.game-user .user-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.game-user .user-details {
	margin-left: 8px;
}

.game-user .user-name {
	font-size: 12px;
	color: #fff0d5;
	font-weight: bold;
	line-height: 1.2;
	max-width: 72px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.rank-entry {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	background: linear-gradient(to bottom, #ffd700, #ffaa00); /* 金色渐变按钮 */
	padding: 1px 5px;
	border-radius: 10px;
}

.rank-entry:hover {
	filter: brightness(1.1);
}

.rank-entry .rank-icon {
	font-size: 10px;
	margin-right: 3px;
}

.rank-entry .rank-text {
	font-size: 10px;
	color: #5a2d0c;
	font-weight: 800;
}

.login-user-toggle {
	display: none;
}

.game-title {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 120px;
}

.game-title .title {
	width: 120px;
	height: 30px;
	font-size: 14px;
	font-weight: bold;
	letter-spacing: 2px;
	color: #fff0d5;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 1;
	background: url(../img/score.png) no-repeat;
	background-size: 100% auto;
	background-position-y: -47px;
	border-top: 1px solid #6e7775;
}

.game-score {
	width: 120px;
	height: 77px;
	background: url('../img/score.png') no-repeat;
	background-size: 100% 100%;
	position: relative;
	top: -4px;
	padding-top: 20px;
}

.score-text {
	width: 100%;
	height: 21px;
	font-size: 12px;
	color: #fbe2c6;
	display: flex;
	align-items: center;
	justify-content: center;
}

.score-num {
	width: 100%;
	height: 35px;
	font-size: 22px;
	font-weight: bold;
	background: linear-gradient(to top, #fffc9f, #ffffe1);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	transform: skewX(-5deg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.game-round {
	position: absolute;
	top: 60px;
	right: 10px;
	width: 110px;
	height: 54px;
	background: url('../img/round.png') no-repeat;
	background-size: 100% 100%;
	font-size: 12px;
}

.round-title {
	width: 100%;
	height: 18px;
	color: #976c33;
	display: flex;
	align-items: center;
	justify-content: center;
}

.round-title span {
	color: #5e7a5e;
}

.round-section {
	display: flex;
	align-items: center;
	justify-content: center;
}

.round-section::before {
	content: '';
	display: block;
	width: 30px;
	height: 20px;
	background: url('../img/yeniu.png') no-repeat;
	background-size: 100% 100%;
	margin-right: 3px;
}

.round-countdown {
	height: 36px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	line-height: 1;
	color: #59574c;
	padding-bottom: 6px;
	transform: scale(0.9);
	transform-origin: left bottom;
}

.round-countdown span {
	color: #ad5757;
}

.round-countdown-text {
	margin-bottom: 2px;
}

.game-skill {
	width: 100%;
	position: absolute;
	bottom: 26px;
	display: flex;
	padding: 0 30px;
	z-index: 100;
}

.game-bear {
	position: absolute;
	top: 100%;
	left: 12px;
	width: 80px;
	height: 103px;
	transition: top 0.3s ease;
}

.game-bear img {
	width: 100%;
	height: auto;
	object-fit: cover;
	display: block;
}

.game-container .game-bubble {
	position: absolute;
	top: -18px;
	left: 76%;
	background: #fff8e3;
	color: #776f5a;
	padding: 6px 11px;
	border-radius: 10px;
	max-width: 200px;
	text-align: center;
	border-bottom-left-radius: 0;
	border: 1px solid #836f5e;
	white-space: nowrap;
	font-size: 12px;
	visibility: hidden;
	transition: visibility 0.3s ease;
	transition-delay: 0.5s;
	transform-origin: left bottom;
}

.game-container.winter .game-bear {
	top: calc(100% - 120px);
}

.game-container.winter .game-bubble {
	visibility: visible;
}

.game-container .game-bubble span {
	color: #6e8b70;
}

.skill-text {
	width: 21%;
	height: 0;
	padding-bottom: calc(220 / 310 * 21%);
	background: url('../img/skill.png') no-repeat;
	background-size: 100% 100%;
	color: transparent;
	font-size: 0;
	filter: grayscale(100%);
	position: relative;
	z-index: 9;
}

.skill-text.active {
	background: url('../img/lion2.png');
	background-size: 1500% 100%;
	animation: lion1 0.9s steps(15) infinite;
	filter: grayscale(0);
	cursor: pointer;
}

.skill-text::before {
	content: '技能';
	position: absolute;
	bottom: -3px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	color: #f6cc91;
	font-size: 12px;
	text-shadow: -1px -1px 0 #633a00, 0 -1px 0 #633a00, 1px -1px 0 #633a00, -1px 0 0 #633a00, 1px 0 0 #633a00,
		-1px 1px 0 #633a00, 0 1px 0 #633a00, 1px 1px 0 #633a00;
}

.progress-wrapper {
	flex: 1;
	width: 0;
	display: flex;
	align-items: flex-end;
}

.progress-bar {
	width: calc(100% + 23px);
	height: 12px;
	background: rgba(40, 22, 0, 0.7);
	border-radius: 4px;
	margin-left: -23px;
	position: relative;
}

.progress-bar::before,
.progress-bar::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	border-radius: 4px;
	transition: width 0.3s ease;
}

.progress-bar::before {
	background-color: rgba(67, 169, 100, 0.8);
	width: var(--first-width);
	z-index: 1;
}

.progress-bar::after {
	background-color: rgba(49, 129, 75, 1);
	width: var(--second-width);
	z-index: 2;
}

.progress-points {
	position: absolute;
	bottom: -1px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 12px;
	color: #fce0ad;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9;
}

.progress-points #currentPoints {
	color: #af5457;
}

.progress-points.active #currentPoints {
	color: inherit;
}

.game-wrapper {
	position: relative;
	top: -23px;
	width: 90%;
	padding: 7% 5.8%;
	background: url('../img/111.png') no-repeat;
	background-size: 100% 100%;
	border-radius: 3px;
	box-sizing: border-box;
	aspect-ratio: 9 / 11;
}

.game-container.winter .game-wrapper {
	background: url('../img/222.png') no-repeat;
	background-size: 100% 100%;
}

.game-wrapper::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border: 1px solid transparent;
	pointer-events: none;
	animation: gameover 0.5s infinite alternate;
	visibility: hidden;
	border-radius: 20px;
}

.game-wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to bottom, rgba(255, 0, 0, 0.2), transparent 14%),
		linear-gradient(to top, rgba(255, 0, 0, 0.2), transparent 14%),
		linear-gradient(to right, rgba(255, 0, 0, 0.2), transparent 14%),
		linear-gradient(to left, rgba(255, 0, 0, 0.2), transparent 14%);
	background-repeat: no-repeat;
	pointer-events: none;
	animation: gameover2 0.5s infinite alternate;
	visibility: hidden;
	border-radius: 20px;
}

.game-wrapper.game-over::after {
	visibility: visible;
}

.game-wrapper.game-over::before {
	visibility: visible;
}

@keyframes gameover {
	0% {
		border-color: rgba(255, 0, 0, 0.1);
		box-shadow: 0 0 5px rgba(255, 0, 0, 0.1);
	}
	100% {
		border-color: rgba(218, 45, 45, 0.4);
		box-shadow: 0 0 20px rgba(255, 100, 100, 0.8);
	}
}

@keyframes gameover2 {
	0% {
		opacity: 0.1;
	}
	100% {
		opacity: 1;
	}
}

.game-board {
	display: grid;
	grid-template-rows: repeat(11, 1fr);
	gap: 1px;
	width: 100%;
	overflow: hidden;
	position: relative;
}

.game-marker {
	width: 100%;
	height: 10px;
	margin-top: 8px;
	border-radius: 3px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 4%, rgba(0, 0, 0, 0.1), transparent 50%),
		linear-gradient(to top, rgba(255, 255, 255, 0.1), transparent 40%);
	background-repeat: no-repeat;
	position: relative;
}

.marker {
	position: absolute;
	top: 2px;
	left: 0;
	height: 6px !important;
	color: transparent;
	font-size: 0;
	padding: 0 2px;
}

.marker::after {
	content: '';
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 2px;
	background: #fff;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.row {
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	gap: 1px;
}

.cell {
	aspect-ratio: 1 / 1;
	border-radius: 2px;
	position: relative;
}

/* 创建灰白相间效果 */
.row:nth-child(odd) .cell:nth-child(odd),
.row:nth-child(even) .cell:nth-child(even) {
	background-color: rgba(255, 186, 102, 0.1);
}

.cell.highlight {
	background-color: rgba(255, 255, 255, 0.3) !important;
}

.block {
	position: absolute;
	top: 0;
	left: 0;
	border-radius: 2px;
	cursor: grab;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	z-index: 399;
}

.block-num {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 999;
	visibility: hidden;
	color: #a5eb9c;
	text-shadow: -1px -1px 0 #333, 0 -1px 0 #333, 1px -1px 0 #333, -1px 0 0 #333, 1px 0 0 #333, -1px 1px 0 #333,
		0 1px 0 #333, 1px 1px 0 #333;
}

.block-num[data-length='2'] {
	color: #48e9ff;
}

.block-num[data-length='3'] {
	color: #d3acff;
}

.block-num[data-length='4'] {
	color: #ff6565;
}

.block-num[data-length='200'] {
	color: #ff6565;
}

.block-star {
	position: absolute;
	visibility: hidden;
	z-index: 599;
}

.block-star::before {
	display: block;
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: #4caf50;
}

.block.dragging {
	cursor: grabbing;
}

.block[data-animal='ostrich'] {
	background: url('../img/tn.gif') center no-repeat;
	background-size: auto 100%;
}

.block[data-animal='egg'] {
	background: url('../img/egg.gif') center no-repeat;
	background-size: auto 100%;
}

.block[data-animal='egg2'] {
	background: url('../img/egg2.gif') center no-repeat;
	background-size: auto 100%;
}

.block[data-animal='zebra'] {
	border-style: solid;
	border-width: var(--cell-size) calc(var(--cell-size) + 1px) 0;
	border-image: url('../img/bm.gif') 200 200 repeat;
	-webkit-border-image: url('../img/bm.gif') 200 200 repeat;
	-moz-border-image: url('../img/bm.gif') 200 200 repeat;
	background: none;
	box-sizing: border-box;
}

.block[data-animal='deer'] {
	border-style: solid;
	border-width: 0 var(--cell-size);
	border-image: url('../img/ml.gif') 0 200;
	-webkit-border-image: url('../img/ml.gif') 0 200;
	-moz-border-image: url('../img/ml.gif') 0 200;
	background: none;
	box-sizing: border-box;
}

.block[data-animal='deer'][data-length='1'] {
	background: url('../img/ml2.gif') left no-repeat;
	background-size: auto 100%;
	border: none;
}

.block[data-animal='elephant'] {
	border-style: solid;
	border-width: 0 var(--cell-size);
	border-image: url('../img/dx.gif') 0 200;
	-webkit-border-image: url('../img/dx.gif') 0 200;
	-moz-border-image: url('../img/dx.gif') 0 200;
	background: none;
	box-sizing: border-box;
}

.block[data-animal='elephant'][data-length='1'] {
	background: url('../img/dx2.gif') left no-repeat;
	background-size: auto 100%;
	border: none;
}

.block[data-animal='lion'] {
	border-style: solid;
	border-width: 0 var(--cell-size);
	border-image: url('../img/sz.gif') 0 200;
	-webkit-border-image: url('../img/sz.gif') 0 200;
	-moz-border-image: url('../img/sz.gif') 0 200;
	background: none;
	box-sizing: border-box;
}

.block[data-animal='bear'] {
	border-style: solid;
	border-width: 0 var(--cell-size);
	border-image: url('../img/bjx.gif') 0 200;
	-webkit-border-image: url('../img/bjx.gif') 0 200;
	-moz-border-image: url('../img/bjx.gif') 0 200;
	background: none;
	box-sizing: border-box;
}

.block[data-animal='buffalo'] {
	border-style: solid;
	border-width: 0 var(--cell-size);
	border-image: url('../img/yn.gif') 0 200;
	-webkit-border-image: url('../img/yn.gif') 0 200;
	-moz-border-image: url('../img/yn.gif') 0 200;
	background: none;
	box-sizing: border-box;
	z-index: 199;
}

.block[data-animal='buffalo'][data-length='1'] {
	background: url('../img/yn2.gif') left no-repeat;
	background-size: auto 100%;
	border: none;
}

.block-default-marker {
	position: absolute;
	width: 36px;
	height: 36px;
	background: linear-gradient(to right, #fff 8px, transparent) 0 0 / 8px 1px,
		linear-gradient(to bottom, #fff 8px, transparent) 0 0 / 1px 8px,
		linear-gradient(to left, #fff 8px, transparent) 100% 0 / 8px 1px,
		linear-gradient(to bottom, #fff 8px, transparent) 100% 0 / 1px 8px,
		linear-gradient(to right, #fff 8px, transparent) 0 100% / 8px 1px,
		linear-gradient(to top, #fff 8px, transparent) 0 100% / 1px 8px,
		linear-gradient(to left, #fff 8px, transparent) 100% 100% / 8px 1px,
		linear-gradient(to top, #fff 8px, transparent) 100% 100% / 1px 8px;
	background-repeat: no-repeat;
	pointer-events: none;
	z-index: 9;
	visibility: hidden;
	animation: blink 2s infinite;
}

@keyframes blink {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.6;
	}
}

.block-drag-marker {
	position: absolute;
	top: 0;
	left: 0;
	width: 36px;
	height: 100%;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent 20%),
		linear-gradient(to top, rgba(255, 255, 255, 0.3), transparent 20%),
		linear-gradient(to right, rgba(255, 255, 255, 0.3), transparent 35%),
		linear-gradient(to left, rgba(255, 255, 255, 0.3), transparent 35%);
	background-repeat: no-repeat;
	background-size: 100% 20%, 100% 20%, 35% 100%, 35% 100%;
	background-position: top, bottom, left, right;
	pointer-events: none;
	z-index: 1;
	visibility: hidden;
}

.game-disabled {
	pointer-events: none;
}

.toast {
	display: inline-block;
	position: absolute;
	top: 0px;
	left: 50%;
	transform: translateX(-50%);
	padding: 5px 20px;
	color: #fdebc9;
	text-shadow: -1px -1px 0 #665e57, 0 -1px 0 #665e57, 1px -1px 0 #665e57, -1px 0 0 #665e57, 1px 0 0 #665e57,
		-1px 1px 0 #665e57, 0 1px 0 #665e57, 1px 1px 0 #665e57;
	font-size: 14px;
	cursor: pointer;
	opacity: 0;
	white-space: nowrap;
	z-index: 2025;
	box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(0, 0, 0, 0.8);
	background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.8) 10%, rgba(0, 0, 0, 0.8) 90%, transparent);
	transition: opacity 0.4s cubic-bezier(0.215, 0.61, 0.355, 1), top 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.toast.toast-active {
	opacity: 1;
}

.toast.toast-danger {
	opacity: 1;
	color: transparent;
	font-size: 0;
	background: url('../img/game_over.png') no-repeat center;
	background-size: cover;
	width: 80%;
	height: 21px;
	box-shadow: none;
	animation: toast-danger 0.6s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
	animation-delay: 0.4s;
}

@keyframes toast-danger {
	0% {
		opacity: 1;
	}
	25% {
		opacity: 0.7;
	}
	50% {
		opacity: 1;
	}
	75% {
		opacity: 0.7;
	}
	100% {
		opacity: 1;
	}
}

.game-buffalo {
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 0;
	transform: translateY(-50%);
	padding-bottom: calc(288 / (18606 / 21) * 100%);
	pointer-events: none;
	z-index: 599;
}

.game-buffalo::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/buffalo_warn.png');
	background-size: 2100% 100%;
}

.game-buffalo.show::before {
	animation: play 1.6s steps(21) forwards;
}

@keyframes play {
	from {
		background-position: 0 0;
	}
	to {
		background-position: -2100% 0;
	}
}

.game-mask {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 299;
	color: #ffffe3;
	font-size: 15px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	padding: 120px 0 40px 0;
	box-sizing: border-box;
	visibility: hidden;
}

.game-mask .mask-cancel {
	color: #ffffe3;
	padding: 4px 10px;
	border-radius: 2px;
	cursor: pointer;
}

.game-mask.show {
	visibility: visible;
}

.game-mask.show + .game-content .block {
	cursor: pointer;
}

.game-tip {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 80%;
	height: auto;
	transform: translate(-50%, -50%);
	background: #f0e2ba;
	border-radius: 5px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.game-login {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	z-index: 299;
	color: #ffffe3;
	font-size: 15px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	visibility: hidden;
	z-index: 2025;
}

.game-login.show {
	visibility: visible;
}

.login-form {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transform: translateY(20px);
	transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-login.show .login-form {
	transform: translateY(0);
}

.login-info {
	width: 64%;
	margin-top: 20px;
	display: flex;
	padding: 10px;
	background-color: #363636;
	border-radius: 4px;
}

.login-info figure {
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 4px;
}

.login-info figure img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 4px;
	object-fit: cover;
}

.login-info figure a {
	display: inline-block;
	margin-top: 6px;
	font-size: 12px;
	outline: none;
	text-decoration: none;
	color: #ffffe3;
}

.login-info section {
	flex: 1;
	margin-left: 10px;
	color: #9f9e9e;
}

.login-info section .login-user {
	display: flex;
	align-items: center;
	position: relative;
}

.login-info section .login-user-inp {
	flex: 1;
}

.login-info section .login-user-inp:last-child::before {
	content: none;
}

.login-info section input {
	line-height: 30px;
	height: 30px;
	width: 100%;
	font-size: 12px;
}

.login-info section .login-qq-loading {
	position: absolute;
	top: 3px;
	right: 0;
	display: block;
	width: 16px;
	height: 16px;
	opacity: 0.5;
	visibility: hidden;
}

.login-info section .login-qq-loading.show {
	visibility: visible;
}

.login-btns {
	margin-top: 40px;
}

.login-btns .btn {
	cursor: pointer;
}

.btn-login {
	padding: 10px 20px;
	background: none;
	color: inherit;
	box-shadow: none;
	transition: none;
}

.btn-guest {
	font-size: 12px;
	text-align: center;
}

.login-tip {
	font-size: 12px;
	margin-top: 40px;
	text-align: center;
	padding: 0 50px;
}

.border-b {
	position: relative;
}

.border-b::before {
	width: 100%;
	height: 1px;
	background-color: #888888;
	display: block;
	content: '';
	position: absolute;
	z-index: 2;
	left: 0;
	right: auto;
	bottom: 0;
	top: auto;
	-webkit-transform-origin: 100% 50%;
	transform-origin: 100% 50%;
	pointer-events: none;
	transform: scaleY(0.5);
	-webkit-transform: scaleY(0.5);
}

.game-rank {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	z-index: 3000;
	display: flex;
	justify-content: center;
	align-items: center;

	opacity: 0;
	visibility: hidden;
	transition: all 0.4s ease;
	backdrop-filter: blur(5px);
}

.game-rank.show {
	opacity: 1;
	visibility: visible;
}

.rank-container {
	width: 300px;
	height: 600px;
	background: #2b2b2b;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	position: relative;
	color: #ffffe3;
	overflow: hidden;
	transform: translateY(20px);
	transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-rank.show .rank-container {
	transform: translateY(0);
}

.rank-close {
	position: absolute;
	top: 10px;
	right: 15px;
	font-size: 24px;
	cursor: pointer;
	opacity: 0.6;
	z-index: 2;
}
.rank-close:hover {
	opacity: 1;
}

.rank-header {
	text-align: center;
	padding-top: 20px;
	background: linear-gradient(to bottom, #363636, #2b2b2b);
}

.rank-header h2 {
	margin: 0;
	font-size: 18px;
	letter-spacing: 2px;
	margin-bottom: 15px;
}

.rank-tabs {
	display: flex;
	justify-content: center;
	gap: 20px;
	font-size: 13px;
	color: #888;
	padding-bottom: 10px;
}

.rank-tabs span {
	cursor: pointer;
	position: relative;
	padding-bottom: 4px;
}

.rank-tabs span.active {
	color: #ffffe3;
	font-weight: bold;
}

.rank-tabs span.active::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background: #ffffe3;
	border-radius: 2px;
}

.rank-podium {
	display: flex;
	justify-content: center;
	align-items: flex-end;
	padding: 20px 0;
	background: #2b2b2b;
	border-bottom: 1px solid #3a3a3a;
}

.podium-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	position: relative;
	margin: 0 10px;
}

.rank-1 {
	order: 2;
	padding-bottom: 10px;
}
.rank-2 {
	order: 1;
}
.rank-3 {
	order: 3;
}

.podium-avatar {
	position: relative;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	border: 2px solid transparent;
	padding: 2px;
}

.podium-avatar img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	background: #000;
}

.badge {
	position: absolute;
	bottom: -5px;
	left: 50%;
	transform: translateX(-50%);
	width: 18px;
	height: 18px;
	border-radius: 50%;
	font-size: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: bold;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.rank-1 .podium-avatar {
	border-color: #ffd700;
	width: 64px;
	height: 64px;
}
.rank-1 .badge {
	background: #ffd700;
	color: #5a4a00;
	width: 20px;
	height: 20px;
	font-size: 12px;
}
.rank-1 .name {
	color: #ffd700;
	font-weight: bold;
	font-size: 14px;
}
.crown-icon {
	position: absolute;
	top: -24px;
	font-size: 20px;
	animation: float 2s ease-in-out infinite;
}

.rank-2 .podium-avatar {
	border-color: #c0c0c0;
}
.rank-2 .badge {
	background: #c0c0c0;
	color: #333;
}
.rank-2 .name {
	color: #c0c0c0;
	font-size: 12px;
}

.rank-3 .podium-avatar {
	border-color: #cd7f32;
}
.rank-3 .badge {
	background: #cd7f32;
	color: #333;
}
.rank-3 .name {
	color: #cd7f32;
	font-size: 12px;
}

.podium-info {
	margin-top: 8px;
}
.podium-info .score {
	font-size: 12px;
	color: #fff;
	margin-top: 2px;
	font-family: monospace;
}

.rank-list {
	flex: 1;
	overflow-y: auto;
	padding: 0 15px;
	background: #2b2b2b;
}

.rank-list::-webkit-scrollbar {
	width: 4px;
}
.rank-list::-webkit-scrollbar-thumb {
	background: #444;
	border-radius: 2px;
}

.rank-list ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.list-none {
	padding-top: 10px;
	text-align: center;
}

.rank-list li {
	display: flex;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid #363636;
	font-size: 13px;
}

.rank-list .num {
	width: 25px;
	text-align: center;
	color: #666;
	font-weight: bold;
}

.rank-list .avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	margin: 0 10px;
	background: #444;
}

.rank-list .name {
	flex: 1;
	color: #ddd;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rank-list .score {
	color: #ffffe3;
	font-family: monospace;
	font-weight: bold;
}

.rank-self {
	background: #363636;
	padding: 12px 15px;
	display: flex;
	align-items: center;
	border-top: 1px solid #444;
	box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
	font-size: 13px;
}

.rank-self .num {
	width: 25px;
	text-align: center;
	color: #aaa;
}

.rank-self .avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	margin: 0 10px;
	border: 1px solid #666;
}

.rank-self .info {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.rank-self .info .name {
	color: #fff;
	font-weight: bold;
}

.rank-self .info .desc {
	font-size: 10px;
	color: #888;
	margin-top: 2px;
}

.rank-self .score {
	color: #ffffe3;
	font-size: 14px;
	font-weight: bold;
}

@keyframes float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-5px);
	}
}

.controls {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 20px;
}

input {
	display: block;
	border: 0 none;
	color: inherit;
	outline: none;
	border-radius: 0;
	-webkit-appearance: none;
	background-color: transparent;
}

button {
	padding: 12px 25px;
	border: none;
	border-radius: 50px;
	background: linear-gradient(145deg, #ff4081, #ff0057);
	color: white;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

button:active {
	transform: translateY(1px);
}

.instructions {
	max-width: 500px;
	margin-top: 20px;
	background: rgba(255, 255, 255, 0.1);
	padding: 15px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
}

.improvement-note {
	margin-top: 15px;
	padding: 10px;
	background: rgba(76, 175, 80, 0.2);
	border-radius: 8px;
	font-size: 14px;
	border-left: 4px solid #4caf50;
}
