body {
	font-family: Arial, sans-serif;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	height: 100vh;
	margin: 0;
	overflow: hidden;
	background-color: #383838;
}

@font-face {
	font-family: 'Teko';
	font-style: normal;
	font-weight: 400;
	src: url('/teko.woff2') format('woff2'),
		 url('/teko.woff') format('woff');
	font-display: swap;
}

@font-face {
	font-family: 'LED';
	font-style: normal;
	font-weight: 400;
	src: url('/digital.woff2') format('woff2'),
		 url('/digital.woff') format('woff');
	font-display: swap;
}

/* ===== 导航栏 ===== */
.navigation-bar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 60px;
	background-color: #696969;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	z-index: 1000;
	box-sizing: border-box;
	transition: top .6s ease;
}

.navigation-actions {
	display: flex;
	gap: 10px;
}

.navigation-action {
	font-size: 18px;
	color: #fff;
	background-color: #595959;
	border: 0;
	padding: 5px 10px;
	border-radius: 5px;
	cursor: pointer;
	transition: background-color .3s ease;
}

.navigation-action:hover {
	background-color: #2c2c2c;
}

/* ===== 主容器 ===== */
.main-container {
	display: flex;
	flex-direction: row;
	justify-content: space-around;
	width: 96%;
	height: auto;
	max-height: 100%;
	user-select: none;
	overflow: hidden;
	transition: transform .3s ease;
}

/* ===== 记分板 ===== */
.scoreboard {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	flex: 1;
	margin: 20px;
	background-color: #696969;
	border-radius: 20px;
	aspect-ratio: 1 / 1;
	max-height: 100%;
	max-width: 100%;
}

.team {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: 100%;
	position: relative;
}

.team-name {
	font-size: 4vw;
	position: absolute;
	margin-top: 5px;
	color: #f5f5f5;
	padding: 5px;
}

.score {
	margin-top: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 18vw;
	font-family: 'Teko', sans-serif;
	cursor: pointer;
	user-select: none;
	width: 100%;
	height: 100%;
	color: #ff0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.score:hover {
	color: #e1e115;
}

.score-decrement {
	position: absolute;
	bottom: 0;
	left: 0;
	font-size: 30px;
	padding: 10px;
	background-color: #d3d3d3;
	border: 0;
	border-radius: 0 10px 0 10px;
	cursor: pointer;
	color: #fff; /* 修复冲突 */
}

.score-decrement:hover {
	color: #FFF;
	background-color: #2c2c2c;
}

/* ===== 局数容器 ===== */
.games-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 20px;
	width: 10vw;
}

.games-counter {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	background-color: #696969;
	border-radius: 20px;
	cursor: pointer;
}

.games-score {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	font-size: 8vw;
	font-family: 'Teko', sans-serif;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #f5f5f5;
}

.games-score:hover {
	color: #d9d9d9;
}

.games-decrement {
	margin-top: 10px;
	font-size: 30px;
	padding: 10px;
	background-color: #d3d3d3;
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	color: #000; /* 保留黑色，符合设计 */
}

.games-decrement:hover {
	color: #FFF;
	background-color: #2c2c2c;
}

/* ===== 底部控制栏 ===== */
.toggle-controls-container {
	position: absolute;
	bottom: 10px;
	display: flex;
	flex-direction: row;
	justify-content: center;
	width: 100%;
	transition: bottom .9s ease;
}

.toggle-controls-container button {
	font-size: 20px;
	padding: 10px 20px;
	background-color: #595959;
	color: white;
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	margin: 10px;
}

.toggle-controls-container button:hover {
	background-color: #2c2c2c;
}

.dropdown-container {
	position: relative;
}

.dropdown-menu {
	display: flex;
	flex-direction: column;
	background-color: #595959;
	border-radius: 10px;
	overflow: hidden;
	position: absolute;
	bottom: 100%;
	margin-bottom: 10px;
	left: 0;
	z-index: 1;
	width: 20vw;
}

.dropdown-menu button {
	font-size: 18px;
	padding: 10px;
	margin: 0;
	background-color: #595959;
	color: white;
	border: 0;
	cursor: pointer;
	width: 100%;
}

/* ===== 主题样式 ===== */
body.red-blue #scoreboard-a {
	background-color: #ff4500;
}

body.red-blue #scoreboard-b {
	background-color: #1e90ff;
}

body.red-blue .team-name {
	color: #fff;
}

body.red-blue .score {
	color: #fff;
}

body.bright {
	background-color: #a9a9a9;
}

body.bright .scoreboard {
	background-color: #FFF;
}

body.bright .scoreboard .team-name {
	color: #000;
}

body.bright #scoreboard-a .score {
	color: red;
}

body.bright #scoreboard-b .score {
	color: #00f;
}

body.bright .games-counter {
	background-color: #FFF;
}

body.bright .games-score {
	color: #000;
}

body.led .score {
	color: #FFF;
	font-size: 12vw;
	font-family: 'LED', sans-serif;
}

body.led .games-score {
	font-family: 'LED', sans-serif;
	font-size: 5vw;
}

body.led .timer-part {
	font-size: 54px;
	width: 2.2em;
	height: 1.6em;
	font-family: 'LED', sans-serif;
}

/* ===== 计时器 ===== */
.timer-container {
	max-width: 540px;
	background-color: #696969;
	border-radius: 20px;
	box-shadow: 0 2px 16px rgba(0,0,0,0.08);
	padding: 20px;
	text-align: center;
	width: 96vw;
	box-sizing: border-box;
	margin-top: 5px;
}

.timer-strip-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 8px;
}

.timer-left-btn,
.timer-right-btn {
	flex: 0 1 120px;
	min-width: 68px;
	max-width: 140px;
}

.timer-center {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
}

.timer-part {
	width: 1em;
	height: 1em;
	letter-spacing: 2px;
	font-size: 84px;
	text-align: right;
	border: 0;
	border-bottom: 3px solid #fff;
	background: transparent;
	outline: 0;
	font-weight: 600;
	color: #f5f5f5;
	transition: border-color .2s;
	font-family: 'Teko', sans-serif;
}

.timer-part:focus {
	border-color: #f6d365;
	background: #979797;
}

.timer-part:disabled {
	color: #bbb;
	background: transparent;
	border-color: #ececec;
}

.timer-sep {
	font-size: 72px;
	font-weight: 700;
	vertical-align: middle;
	margin: 0 5px 0 5px;
	color: #bbb;
	user-select: none;
}

.timer-btn {
	padding: 10px;
	background-color: #595959;
	color: white;
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	margin: 10px;
}

.timer-btn:hover {
	background-color: #2c2c2c;
}

.timer-btn img {
	width: 40px;
	height: 40px;
	filter: invert(100%) hue-rotate(180deg) saturate(100%);
}

#secInput {
	text-align: left;
	margin-left: 8px;
}

/* ===== 闪烁动画（计时结束） ===== */
.flashing {
	animation: flash-bg 0.5s alternate infinite;
}
@keyframes flash-bg {
	0% { background: #f6d365; }
	100% { background: #fff; }
}

/* ===== 响应式 ===== */
@media (max-width: 700px) {
	.navigation-bar {
		height: 40px;
	}

	.toggle-controls-container button {
		font-size: 16px;
		padding: 5px 10px;
	}

	.scoreboard {
		margin: 3px;
	}

	.games-container {
		margin: 3px;
	}

	.score-decrement {
		font-size: 24px;
		padding: 3px;
	}

	.games-counter {
		border-radius: 10px;
	}

	.games-decrement {
		padding: 3px;
		border-radius: 5px;
		font-size: 20px;
	}

	.timer-container {
		max-width: 380px;
		padding: 10px;
		margin-bottom: 10px;
	}

	.timer-strip-row {
		gap: 4px;
	}

	.timer-part,
	.timer-sep {
		font-size: 60px;
	}

	body.led .timer-part,
	.timer-sep {
		font-size: 34px;
	}

	.timer-btn img {
		width: 30px;
		height: 30px;
	}
}