@font-face {
	font-family: 'NotoSans';
	src: url('fonts/NotoSans-Bold.ttf') format('truetype');
	font-weight: bold;
}

@font-face {
	font-family: 'NotoSans';
	src: url('fonts/NotoSans-Regular.ttf') format('truetype');
	font-weight: 400;
}

body {
	font-family: 'NotoSans', Arial, sans-serif;
	background-color: #f4f4f4;
	color: #333;
	text-align: center;
	margin: 0;
	padding: 20px;
}

h1 {
	margin-bottom: 10px;
	font-weight: bold;
}

#grid-container {
	display: grid;
	grid-template-columns: 80px repeat(31, 45px);
	grid-template-rows: 30px repeat(12, 45px);
	justify-content: center;
	margin: 20px auto;
	gap: 0;
}

.day-label,
.month-label {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: bold;
	color: #333;
}

.month-label {
	justify-content: flex-end;
	padding-right: 10px;
}

.pixel {
	width: 45px;
	height: 45px;
	border: 1px solid #dcdcdc;
	cursor: pointer;
}

.pixel.disabled {
	visibility: hidden;
	cursor: not-allowed;
}

#controls {
	margin-top: 50px;
}

input[type='file'] {
	margin: 10px;
}

input[type='text'] {
	padding: 5px;
	width: 200px;
}

button {
	padding: 10px 15px;
	margin: 5px;
	cursor: pointer;
}

select {
	padding: 5px;
	margin: 10px;
}

#value-list {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	justify-content: center;
	margin-top: 20px;
}

#value-list li {
	display: flex;
	align-items: center;
	gap: 10px;
}

#value-list .master-pixel {
	width: 30px;
	height: 30px;
	border: 1px solid #3a3a3a;
	cursor: pointer;
}

#value-list .value-label {
	font-size: 16px;
	color: #3a3a3a;
	font-weight: 400;
}

#value-list .value-label.selected {
	font-weight: bold;
}

/* Popup overlay styles (for pixel-notes) */
#popup-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.5);
	display: none;
	/* hidden by default */
	justify-content: center;
	align-items: center;
	z-index: 9999;
}

#popup-content {
	background-color: #fff;
	padding: 20px;
	border-radius: 8px;
	min-width: 800px;
	text-align: left;
}

#popup-textarea {
	width: 100%;
	height: 350px;
	resize: both;
}

#popup-save-btn:disabled {
	background-color: #bbb;
	cursor: not-allowed;
}

/* Popup for masterPixel summary */
#master-pixel-popup-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.5);
	display: none;
	/* hidden by default */
	justify-content: center;
	align-items: center;
	z-index: 99999;
	/* ensure above everything else */
}

#master-pixel-popup-content {
	background-color: #fff;
	padding: 50px;
	padding-top: 40px;
	padding-bottom: 30px;
	border-radius: 8px;
	text-align: left;
	min-width: 30px;
}

#master-pixel-popup-title {
	margin-top: 0;
	margin-bottom: 10px;
	font-weight: bold;
}

#master-pixel-popup-body {
	white-space: pre-line;
	/* so newlines or line breaks are respected */
}

.overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999;
}

/* Overlay che toàn bộ trang */
#initial-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: white;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999;
}

/* Hộp nhập ngân hàng */
#bank-box {
	background: #f9f9f9;
	color: #333;
	padding: 20px;
	width: 300px;
	text-align: center;
	border-radius: 10px;
	box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
	font-family: Arial, sans-serif;
}

#bank-box h2 {
	font-size: 16px;
	margin-bottom: 10px;
	opacity: 0.8;
}

/* Căn giữa input */
#bank-box input {
	width: calc(100% - 20px);
	padding: 10px;
	margin-top: 10px;
	border: 1px solid #ccc;
	background: white;
	color: black;
	border-radius: 5px;
	text-align: center;
}

#bank-box button {
	margin-top: 10px;
	width: 100%;
	padding: 10px;
	border: none;
	background: #3a3a3a;
	color: white;
	font-size: 14px;
	border-radius: 5px;
	cursor: pointer;
}

#bank-box button:hover {
	background: #218838;
}

/* Toast container */
.toast {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: bold;
	color: white;
	box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
	white-space: nowrap;
	z-index: 1000;
}

/* Toast hiển thị */
.toast.show {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(-10px);
}

/* Màu sắc cho từng loại */
.toast.success {
	background-color: #52c41a;
}

/* Xanh lá */
.toast.error {
	background-color: #ff4d4f;
}

/* Đỏ */
.toast.info {
	background-color: #1890ff;
}

/* Xanh dương */
.toast.warning {
	background-color: #ffa500;
}