@charset "utf-8";
:root {
	--bg-calm: radial-gradient(circle at top, #0f172a 0%, #020617 70%, #000 100%);
	--bg-fear: radial-gradient(circle at top, #052043 0%, #030712 55%, #000 100%);
	--bg-anger: radial-gradient(circle at top, #450a0a 0%, #0f172a 60%, #000 100%);
	--bg-joy: radial-gradient(circle at top, #f97316 0%, #fde68a 50%, #0f172a 100%);
	--text: #e2e8f0;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	height: 100vh;
	background: var(--bg-calm);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	overflow: hidden;
	transition: background .6s ease;
}
canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}
.center-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	z-index: 6;
	pointer-events: none;
	padding: 0 1.2rem;
}
#commandText {
	font-size: clamp(1.4rem, 4.5vw, 2.8rem);
	font-weight: 600;
	line-height: 1.07;
	text-shadow: 0 12px 36px rgba(0,0,0,.4);
	max-width: 980px;
	letter-spacing: 0.01em;
}
.tone-panel {
	position: absolute;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	display: flex;
	gap: .55rem;
	z-index: 7;
	pointer-events: none;
	flex-wrap: wrap;
	justify-content: center;
}
.tone-card {
	display: flex;
	align-items: center;
	gap: .4rem;
	background: rgba(2,6,23,.25);
	border: 1px solid rgba(148,163,184,.12);
	border-radius: 999px;
	padding: .25rem .65rem .35rem .25rem;
	min-width: 150px;
	backdrop-filter: blur(6px);
	opacity: .45;
	transition: opacity .1s ease, transform .1s ease;
}
.tone-card.active-tone {
	opacity: 1;
	background: rgba(248,250,252,.12);
	border-color: rgba(255,255,255,.3);
	transform: translateY(-3px);
}
.tone-avatar {
	width: 30px;
	height: 30px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	font-size: 1rem;
	font-weight: 600;
	color: #0f172a;
}
.tone-name {
	font-size: 1rem;
	line-height: 1;
}
.tone-desc {
	font-size: 1rem;
	opacity: .65;
}
.tone-blue {
	background: radial-gradient(circle, #38bdf8 0%, #0f172a 100%);
}
.tone-green {
	background: radial-gradient(circle, #4ade80 0%, #064e3b 100%);
	color: #022c22;
}
.tone-red {
	background: radial-gradient(circle, #f97316 0%, #7f1d1d 100%);
}
.tone-yellow {
	background: radial-gradient(circle, #fde68a 0%, #f97316 100%);
}
.overlay {
	position: relative;
	z-index: 8;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .85rem;
	padding: .7rem 1.4rem 1.1rem;
	text-align: center;
	max-width: min(95vw, 1100px);
	margin: 0 auto;
}
.badge {
	background: rgba(15, 23, 42, 0.44);
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 999px;
	padding: .25rem .85rem .35rem;
	font-size: 1rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	display: inline-flex;
	gap: .35rem;
	align-items: center;
}
.moods {
	display: flex;
	gap: .45rem;
	flex-wrap: wrap;
	justify-content: center;
}
.mood-btn {
	border: 1px solid rgba(226, 232, 240, .18);
	background: rgba(2, 6, 23, .1);
	padding: .3rem .85rem .4rem;
	border-radius: .9rem;
	cursor: pointer;
	font-size: 1rem;
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	backdrop-filter: blur(8px);
	transition: .15s ease;
	color: rgba(226,232,240,.78);
}
.mood-btn.active {
	background: rgba(226, 232, 240, .08);
	color: #fff;
	border-color: rgba(226,232,240,.5);
	transform: translateY(-1px);
}
.controls {
	display: flex;
	gap: .5rem;
	flex-wrap: wrap;
	justify-content: center;
}
#startBtn, #stopBtn {
	background: rgba(14, 165, 233, .28);
	border: 1px solid rgba(14, 165, 233, .28);
	border-radius: 999px;
	padding: .4rem 1.2rem .5rem;
	gap: .35rem;
	font-weight: 600;
	color: #ecfeff;
	backdrop-filter: blur(10px);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	transition: .2s ease;
	font-size: 1rem;
}
#stopBtn {
	background: rgba(248,113,113,0.14);
	border: 1px solid rgba(248,113,113,0.25);
	color: #fee2e2;
}
#startBtn.playing {
	opacity: .75;
}
@media (max-width: 650px) {
	#commandText {
		font-size: clamp(1.2rem, 5.6vw, 2.2rem);
	}
	.tone-card {
		min-width: 130px;
	}
}