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

html, body {
	height: 100%;
	width: 100%;
	font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
	background: #000000;
	color: #e8f0ff;
	overflow: hidden;
}

#space {
	display: block;
	width: 100vw;
	height: 100vh;
	background: #000000;
}

#ui {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 340px;
	background: linear-gradient(135deg, rgba(15, 20, 35, 0.92) 0%, rgba(8, 12, 25, 0.95) 100%);
	border: 1px solid rgba(100, 150, 255, 0.15);
	backdrop-filter: blur(20px);
	padding: 20px;
	border-radius: 16px;
	box-shadow: 0 12px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(50, 100, 255, 0.08);
	transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s ease;
}

#ui.hidden {
	transform: translateY(calc(100% + 40px));
	opacity: 0;
	pointer-events: none;
}

.toggle-btn {
	position: fixed;
	right: 30px;
	bottom: 20px;
	width: 40px;
	height: 40px;
	background: linear-gradient(135deg, rgba(15, 20, 35, 0.92) 0%, rgba(8, 12, 25, 0.95) 100%);
	border: 1px solid rgba(100, 150, 255, 0.15);
	border-radius: 50%;
	color: #a8c5ff;
	font-size: 18px;
	cursor: pointer;
	backdrop-filter: blur(20px);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 20px rgba(50, 100, 255, 0.1);
	transition: transform 0.5s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

.toggle-btn:hover {
	background: linear-gradient(135deg, rgba(25, 35, 55, 0.95) 0%, rgba(15, 20, 40, 0.98) 100%);
	border-color: rgba(100, 150, 255, 0.3);
	box-shadow: 0 6px 30px rgba(80, 140, 255, 0.4);
}

.toggle-btn.rotated {
	transform: rotate(180deg);
}

.toggle-btn.rotated:hover {
	transform: rotate(180deg) scale(1.05);
}

.toggle-btn:not(.rotated):hover {
	transform: scale(1.05);
}

#info {
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(100, 150, 255, 0.12);
}

#simTime {
	font-size: 14px;
	font-weight: 600;
	color: #a8c5ff;
	margin-bottom: 4px;
	letter-spacing: 0.3px;
}

#yearPerSec {
	font-size: 12px;
	color: #7a95d9;
	font-weight: 500;
}

#controls {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.control-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	color: #c5d9ff;
	font-weight: 500;
	padding: 2px 0;
}

.control-row label {
	cursor: pointer;
}

input[type="range"] {
	flex: 1;
	height: 6px;
	background: linear-gradient(to right, rgba(80, 120, 255, 0.3), rgba(80, 120, 255, 0.15));
	border-radius: 10px;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
	appearance: none;
	width: 16px;
	height: 16px;
	background: linear-gradient(135deg, #6b9cff 0%, #4a7dff 100%);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(80, 140, 255, 0.6);
	transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
	transform: scale(1.2);
	box-shadow: 0 3px 12px rgba(80, 140, 255, 0.8);
}

input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: linear-gradient(135deg, #6b9cff 0%, #4a7dff 100%);
	border-radius: 50%;
	cursor: pointer;
	border: none;
	box-shadow: 0 2px 8px rgba(80, 140, 255, 0.6);
	transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
	transform: scale(1.2);
	box-shadow: 0 3px 12px rgba(80, 140, 255, 0.8);
}

input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: #5a8fff;
	filter: brightness(1.1);
}

input[type="color"] {
	width: 50px;
	height: 32px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	background: transparent;
	overflow: hidden;
}

input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
	border-radius: 6px;
}

input[type="color"]::-webkit-color-swatch {
	border: 2px solid rgba(100, 150, 255, 0.3);
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

input[type="color"]::-moz-color-swatch {
	border: 2px solid rgba(100, 150, 255, 0.3);
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

input[type="number"] {
	width: 80px;
	padding: 6px 10px;
	background: rgba(30, 40, 60, 0.6);
	border: 1px solid rgba(100, 150, 255, 0.2);
	border-radius: 6px;
	color: #c5d9ff;
	font-size: 13px;
	font-weight: 500;
	outline: none;
	transition: all 0.2s ease;
}

input[type="number"]:focus {
	background: rgba(35, 50, 75, 0.7);
	border-color: rgba(100, 150, 255, 0.4);
	box-shadow: 0 0 10px rgba(80, 140, 255, 0.2);
}

@media (max-width: 480px) {
	#ui {
		width: 90%;
		left: 50%;
		transform: translateX(-50%);
		right: auto;
		bottom: 10px;
	}
}