@font-face {
	font-family: "SevenSegment";
	src: url("../fonts/Seven\ Segment.ttf") format("truetype");
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
input,
button,
select,
textarea,
p {
	font-family: sans-serif;
}

body {
	background-color: white;
	color: black;
	transition: background-color 0.3s ease, color 0.3s ease;
}

body.darkMode {
	background-color: #121212;
	color: #e0e0e0;
}

body.darkMode .modalContent {
	background-color: #111 !important;
	color: #eee !important;
	border-color: #444 !important;
}

body.darkMode .button {
	background-color: #222 !important;
	color: #fff !important;
	border: 1px solid #555 !important;
}

body.darkMode .button:hover {
	background-color: #555 !important;
	color: #fff !important;
}

body.darkMode input,
body.darkMode textarea,
body.darkMode select {
	background-color: #222 !important;
	color: #eee !important;
	border: 1px solid #555 !important;
}

body.darkMode .nav {
	background-color: #111 !important;
	border-bottom: 1px solid #444 !important;
}

body.darkMode .toast {
	background-color: #900 !important;
	color: #fff !important;
}

body.darkMode .counterGame,
body.darkMode .timerGame {
	background-color: #000 !important;
	color: #f00 !important;
	border-color: #900 !important;
}

body.darkMode .grid {
	background-color: #000 !important;
	border-color: #555 !important;
}

body.darkMode .rankingTable thead {
	background-color: #1e1e1e !important;
	color: #e0e0e0 !important;
}

body.darkMode .rankingTable th {
	background-color: #1e1e1e !important;
	color: #e0e0e0 !important;
	border: 1px solid #444 !important;
}

body.darkMode .rankingTable td {
	background-color: #222 !important;
	color: #ddd !important;
	border: 1px solid #444 !important;
}

.nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 30px;
	background-color: #f0f0f0;
	border-bottom: 1px solid #ccc;
	gap: 10px;
}

.nav-links {
	display: flex;
	gap: 10px;
}

.selectorDificultad {
	flex: 1 1 100%;
	text-align: center;
}

.selectorDificultad select {
	padding: 4px 10px;
	font-size: 16px;
	margin-top: 10px;
}

.main {
	display: flex;
	justify-content: center;
}

.container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin-top: 20px;
}

.grid {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 2px;
	border: 2px solid #333;
	background-color: #333;
	padding: 0;
	box-sizing: content-box;
	justify-content: center;
	font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
		"Lucida Sans", Arial, sans-serif;
}

.cell {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	background-color: lightgray;
	border: 1px solid #999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	user-select: none;
	box-sizing: border-box;
	overflow: hidden;
}

.cell-mine {
	flex: 0 0 40px;
	background-color: red;
	border: 1px solid #999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	user-select: none;
	box-sizing: border-box;
	background-image: url("mine.png");
}

.cell-reveal {
	flex: 0 0 40px;
	background-color: white;
	border: 1px solid #999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	user-select: none;
	box-sizing: border-box;
	background-image: url("mine.png");
}

.playButtons {
	background-color: lightgray;
	border-left: 16px solid lightgray;
	border-right: 16px solid lightgray;
	padding: 10px;
	text-align: center;
	display: flex;
	justify-content: space-between;
	box-sizing: border-box;
}

.counterGame,
.timerGame {
	font-family: "SevenSegment", monospace;
	font-size: 30px;
	color: #ff0000;
	background-color: #111;
	padding: 4px 0;
	border-radius: 8px;
	border: 3px solid #ff1a1a;
	width: 35%;
	text-align: center;
	user-select: none;
	letter-spacing: 4px;
	font-weight: bolder;
}

.modal {
	display: none;
	position: fixed;
	z-index: 999;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.4);
}

.modalContent {
	background-color: #fff;
	margin: 10% auto;
	padding: 20px;
	border: 1px solid #888;
	width: 80%;
	max-width: 600px;
	border-radius: 8px;
}

#startModal .modalContent button {
	margin-top: 15px;
}

.close {
	color: #aaa;
	float: right;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
}

.close:hover,
.close:focus {
	color: black;
	text-decoration: none;
}

.error {
	display: none;
	color: red;
}

.rankingTable {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
}

.rankingTable th,
.rankingTable td {
	padding: 10px;
	text-align: center;
	border: 1px solid #ccc;
}

.rankingTable th {
	background-color: #f4f4f4;
	font-weight: bold;
}

.resetGameButton {
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 36px;
	cursor: pointer;
	user-select: none;
	height: 50px;
	border-radius: 8px;
	font-weight: bolder;
	box-sizing: border-box;
	text-align: center;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
	background-color: transparent;
	border: none;
}

.resetGameButton:hover {
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	transform: scale(1.05);
}

.num-1 {
	color: #0000ff;
}

.num-2 {
	color: #008000;
}

.num-3 {
	color: #ff0000;
}

.num-4 {
	color: #000080;
}

.num-5 {
	color: #800000;
}

.num-6 {
	color: #00cccc;
}

.num-7 {
	color: #000000;
}

.num-8 {
	color: #808080;
}

.button {
	padding: 10px 20px;
	background-color: #007bff;
	border: none;
	color: white;
	font-size: 16px;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.3s ease;
	text-align: center;
}

.button:hover {
	background-color: #0056b3;
}

.nav {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 10px 20px;
	gap: 10px;
}

.flag {
	font-size: 14px;
	display: inline-block;
	line-height: 1;
	pointer-events: none;
}

.button.small {
	padding: 6px 12px;
	font-size: 14px;
}

.icon {
	width: 16px;
	height: 16px;
	filter: invert(1);
	margin-right: 5px;
}

#contactForm input,
#contactForm textarea {
	width: 100%;
	padding: 10px;
	margin-top: 10px;
	margin-bottom: 5px;
	border-radius: 4px;
	border: 1px solid #ccc;
	font-size: 14px;
	box-sizing: border-box;
}

#contactForm textarea {
	resize: vertical;
}

#board {
	transform-origin: top center;
}

@media (max-width: 800px) {
	#board {
		transform: scale(0.8);
	}
}

@media (max-width: 560px) {
	#board {
		transform: scale(0.6);
	}
}