:root {
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
	background: #0a1c2e;
}

.shark-game {
	width: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	padding: 0.8rem;
	background: radial-gradient(circle at 11% 10%, rgba(82, 220, 255, 0.22), transparent 28%),
		linear-gradient(180deg, #07233f 0%, #0b3558 100%);
}

.shark-game-header,
.shark-game-actions {
	background: rgba(6, 20, 33, 0.65);
	border: 1px solid rgba(139, 228, 255, 0.33);
	border-radius: 12px;
	padding: 0.72rem 0.85rem;
}

.shark-game-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.shark-game-tip {
	margin: 0;
	color: #d2f3ff;
	font-size: 0.94rem;
	font-weight: 600;
}

.shark-game-stats {
	margin-top: 0.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: #f5fdff;
}

.shark-stage {
	flex: 1;
	min-height: 350px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.8rem;
}

.shark-table {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.st-table-surface {
	position: absolute;
	inset: 14% 2% 8%;
	border-radius: 24px;
	background: linear-gradient(180deg, #8d623f 0%, #643d24 100%);
	box-shadow: inset 0 10px 28px rgba(255, 203, 145, 0.08), 0 16px 30px rgba(0, 0, 0, 0.32);
	border: 1px solid rgba(255, 208, 156, 0.2);
}

.shark-mouth-wrap {
	position: relative;
	z-index: 2;
	width: min(920px, 96%);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow-x: auto;
}

.shark-mouth {
	width: 100%;
	border-radius: 108px 108px 86px 86px;
	padding: 2.05rem 1.12rem 1.45rem;
	background: linear-gradient(180deg, #93b7cf 0%, #789fb9 55%, #5f87a2 100%);
	border: 2px solid rgba(25, 63, 93, 0.5);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	position: relative;
	overflow: hidden;
}

.shark-mouth::before {
	content: '';
	position: absolute;
	inset: 2.15rem 1.55rem 1.55rem;
	border-radius: 72px;
	background:
		radial-gradient(circle at 50% 56%, rgba(24, 3, 3, 0.95) 0%, rgba(45, 9, 9, 0.95) 52%, rgba(83, 36, 28, 0.9) 100%),
		radial-gradient(circle at 50% 40%, rgba(255, 174, 124, 0.2), transparent 50%);
	border: 2px solid rgba(255, 201, 176, 0.2);
	z-index: 1;
}

.shark-mouth::after {
	content: '';
	position: absolute;
	top: 1.2rem;
	left: 0;
	right: 0;
	height: 22px;
	background:
		radial-gradient(circle at 12% 50%, #12202a 0 7px, rgba(235, 250, 255, 0.32) 8px 11px, transparent 12px),
		radial-gradient(circle at 88% 50%, #12202a 0 7px, rgba(235, 250, 255, 0.32) 8px 11px, transparent 12px);
	z-index: 3;
	pointer-events: none;
}

.st-jaw {
	display: grid;
	grid-template-columns: repeat(14, minmax(0, 1fr));
	gap: 0.24rem;
	position: relative;
	z-index: 2;
	min-width: 720px;
}

.st-jaw-top {
	transform: perspective(420px) rotateX(10deg);
	margin-top: 0.45rem;
}

.st-tooth {
	min-height: 52px;
	background: linear-gradient(180deg, #ffffff 0%, #d7dfe8 100%);
	border: 1px solid rgba(24, 53, 78, 0.24);
	clip-path: polygon(0 0, 100% 0, 50% 100%);
	box-shadow: inset 0 -10px 12px rgba(0, 0, 0, 0.14);
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-top: 4px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	color: #35526b;
	user-select: none;
}

.st-jaw-bottom {
	transform: perspective(420px) rotateX(-10deg);
	margin-bottom: 0.2rem;
}

.st-jaw-bottom .st-tooth {
	clip-path: polygon(50% 0, 0 100%, 100% 100%);
	background: linear-gradient(180deg, #f3f8ff 0%, #d4ddea 100%);
	align-items: flex-end;
	padding-top: 0;
	padding-bottom: 4px;
}

.st-tooth.st-pulled {
	background: linear-gradient(180deg, #7d92a3 0%, #4e5f6d 100%);
	opacity: 0.28;
	filter: grayscale(0.8);
}

.st-tooth.st-rotten {
	background: linear-gradient(180deg, #ffdf7f 0%, #ff8f2f 100%);
	opacity: 1;
	box-shadow: 0 0 0 2px rgba(110, 46, 0, 0.32), inset 0 -6px 10px rgba(94, 34, 0, 0.25);
}

.st-tooth.st-reveal {
	background: linear-gradient(180deg, #ffe8a3 0%, #ffad52 100%);
	opacity: 1;
	animation: st-reveal-flash 0.45s ease-in-out infinite;
}

.shark-mouth.st-bite {
	animation: st-bite 0.45s ease;
}

.st-picks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-right: 0.35rem;
}

.st-pick-btn {
	border: 0;
	border-radius: 999px;
	padding: 0.42rem 0.85rem;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
	background: linear-gradient(180deg, #d2f1ff 0%, #8fd7ff 100%);
	color: #033153;
}

.st-pick-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

#st-start,
.st-guide-btn,
.st-back {
	border: 0;
	border-radius: 999px;
	padding: 0.45rem 0.9rem;
	font-size: 0.92rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

#st-start {
	background: #24c7ff;
	color: #022a4b;
}

.st-guide-btn {
	background: #ffd86e;
	color: #3e2a00;
}

.st-back {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

#st-message {
	color: #d3f3ff;
	font-weight: 600;
	font-size: 0.9rem;
}

.st-guide-panel {
	width: 100%;
	white-space: pre-wrap;
	background: rgba(4, 13, 22, 0.72);
	border: 1px solid rgba(139, 228, 255, 0.24);
	border-radius: 10px;
	padding: 0.65rem 0.75rem;
	font-size: 0.83rem;
	line-height: 1.45;
	color: #d7f4ff;
}

.is-hidden {
	display: none;
}

@keyframes st-bite {
	0% {
		transform: scale(1);
	}
	35% {
		transform: scale(0.95);
	}
	100% {
		transform: scale(1);
	}
}

@keyframes st-reveal-flash {
	0%,
	100% {
		filter: brightness(1);
		box-shadow: 0 0 0 0 rgba(255, 146, 63, 0.2);
	}
	50% {
		filter: brightness(1.1);
		box-shadow: 0 0 0 6px rgba(255, 146, 63, 0.35);
	}
}

@media (max-width: 900px) {
	.shark-stage {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 720px) {
	.shark-game {
		padding: 0.5rem;
	}

	.shark-stage {
		grid-template-columns: 1fr;
		grid-template-rows: 1fr;
	}

	.shark-table {
		order: 1;
		min-height: 340px;
	}

	.shark-mouth {
		padding-top: 2.45rem;
	}

	.shark-mouth::before {
		inset: 2.55rem 1.3rem 1.3rem;
	}

	.st-tooth {
		min-height: 46px;
	}

	.st-jaw-top {
		transform: perspective(420px) rotateX(7deg);
		margin-top: 0.7rem;
	}

	.st-jaw {
		min-width: 0;
		gap: 0.16rem;
	}

	.st-jaw-bottom {
		min-width: 0;
	}

	.shark-game-tip,
	.shark-game-stats,
	#st-message {
		font-size: 0.85rem;
	}
}
