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

body {
	font-family: Arial, sans-serif;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	background-color: #f0f0f0;
}

.container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.fib-clock {
	width: 804px; /* 考虑边框宽度 */
	height: 504px;
	position: relative;
	border: 2px solid #333;
}

.square {
	position: absolute;
	border: 1px solid #333;
	transition: background-color 0.3s;
}

/* 正方形大小和位置设置 */
#square5 {
	width: 500px;
	height: 500px;
	top: 0;
	left: 300px;
	z-index: 1;
}

#square3 {
	width: 300px;
	height: 300px;
	top: 200px;
	left: 0;
	z-index: 2;
}

#square2 {
	width: 200px;
	height: 200px;
	top: 0;
	left: 0;
	z-index: 3;
}

#square1a {
	width: 100px;
	height: 100px;
	top: 0;
	left: 200px;
	z-index: 4;
}

#square1b {
	width: 100px;
	height: 100px;
	top: 100px;
	left: 200px;
	z-index: 4;
}

.hidden {
	display: none;
}

/* 颜色定义 */
.white {
	background-color: white;
}

.red {
	background-color: #ff6b6b;
}

.green {
	background-color: #4ecb71;
}

.blue {
	background-color: #4e9acb;
}

.time-display {
	font-size: 24px;
	padding: 10px;
	background-color: #333;
	color: white;
	border-radius: 5px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 500px;
}

.time-input {
	display: flex;
	align-items: center;
	gap: 8px;
}

#time-picker {
	padding: 5px;
	font-size: 16px;
	border-radius: 3px;
	border: none;
}

#set-time-btn,
#reset-time-btn {
	padding: 5px 10px;
	font-size: 14px;
	background-color: #4e9acb;
	color: white;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition: background-color 0.2s;
}

#set-time-btn:hover,
#reset-time-btn:hover {
	background-color: #3d7ca6;
}

.legend {
	display: flex;
	gap: 15px;
	margin-top: 10px;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 5px;
}

.color-sample {
	width: 20px;
	height: 20px;
	border: 1px solid #333;
}

.demo-controls {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 5px;
	width: 100%;
}

#speed-slider {
	width: 150px;
	margin: 0 10px;
}

#demo-toggle-btn {
	padding: 5px 10px;
	font-size: 14px;
	background-color: #4ecb71;
	color: white;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition: background-color 0.2s;
}

#demo-toggle-btn:hover {
	background-color: #3eab61;
}

#demo-toggle-btn.paused {
	background-color: #ff6b6b;
}

#demo-status {
	font-size: 14px;
	color: #4ecb71;
	animation: blink 1.5s infinite;
}

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