:root {
	--border-color: #e5e5e5;
	--edge-length: 100%;
	--edge-thickness: 5px;
}

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

body {
	font-family: "Arial", sans-serif;
	background: #f6f6f6;
	width: 100vw;
	height: 100vh;
	display: grid;
	place-items: center;
	max-height: 100vh;
	user-select: none;
}

a {
	color: #333;
}

/* .setting p a{
    margin-top: 0.1rem;
    border-radius: 4px;
    padding: 0.2rem;
    font-weight: bold;
    background: #333;
    color: #ef1414;
    cursor: pointer;
    letter-spacing: 2px;
    text-align: center;
} */

.board {
	background: #fcfcfc;
	display: grid;
	width: 75vh;
	max-height: 75vh;
}

@media screen and (max-width: 805px) {
	.board {
		width: 80vw;
	}
}

.box {
	position: relative;
	aspect-ratio: 1/1;
	transition: background 500ms;
}

.box.filled::after {
	position: absolute;
	z-index: 40;
	background: rgb(255, 255, 255);
	opacity: 0;
	content: "";
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	animation: 800ms fillAnim 0s 1;
	background-blend-mode: soft-light;
}

@keyframes fillAnim {
	from {
		transform: scale(1);
		opacity: 0.3;
	}

	30% {
		transform: scale(0.5);
		opacity: 0.6;
	}

	to {
		transform: scale(1);
		opacity: 0.3;
	}
}

.edge {
	appearance: none;
	position: absolute;
	border: none;
	cursor: pointer;
	border-radius: 1rem;
	background: var(--border-color);
}

.edge:hover {
	background: rgb(189, 189, 189);
	z-index: 10;
}

.edge:active {
	background: rgb(170, 170, 170);
	z-index: 10;
}

.edge.left,
.edge.right {
	width: var(--edge-thickness);
	height: var(--edge-length);
}

.edge.top,
.edge.bottom {
	height: var(--edge-thickness);
	width: var(--edge-length);
}

.edge.top {
	transform: translateY(-50%);
	top: 0;
	left: 0;
}

.edge.right {
	transform: translateX(50%);
	top: 0;
	right: 0;
}

.edge.bottom {
	transform: translateY(50%);
	bottom: 0;
	left: 0;
}

.edge.left {
	transform: translateX(-50%);
	top: 0;
	left: 0;
}

.edge:before {
	position: absolute;
	content: "";
	inset: 0;
	width: 100%;
	height: 100%;
}

.edge.left:before,
.edge.right:before {
	transform: scale(3, 0.7);
}

.edge.top:before,
.edge.bottom:before {
	transform: scale(0.7, 3);
}

.Player_1,
.Player_2,
.Player_3,
.Player_4,
.Player_5,
.Player_6 {
	pointer-events: none;
	z-index: 10;
}

.Player_1 {
	background: pink;
}

.Player_2 {
	background: skyblue;
}

.Player_3 {
	background: lightgreen;
}

.Player_4 {
	background: magenta;
}

.Player_5 {
	background: yellow;
}

.Player_6 {
	background: orange;
}

.players {
	z-index: 10;
	font-size: 1rem;
	top: 0;
	left: 0;
	width: 100%;
	padding: 0.4rem;
	display: flex;
	justify-content: center;
	gap: 1.2rem;
}

.player .filled-boxes {
	display: inline-block;
	text-align: center;
	width: 28px;
	margin-right: 4px;
	background-color: rgb(136, 136, 136);
	border: solid 3px #111;
	border-radius: 3px;
	color: rgba(0, 0, 0, 0.922);
}

@media screen and (max-width: 600px) {
	.player span {
		font-size: 0.8rem;
	}

	.players {
		gap: 0.5rem;
	}
}

.player-turn {
	font-size: 1rem;
	z-index: 10;
	left: 0;
	width: 100%;
	display: flex;
	justify-content: center;
	color: rgba(0, 0, 0, 0.864);
	margin: 1rem 0;
}

.player-turn .bg {
	background: #999;
	padding: 0.5rem 1rem;
	width: 320px;
	min-width: 100px;
	max-width: 500px;
	text-align: center;
	border-radius: 1rem;
	height: 80px;

	background: #999;
	padding: 0.5rem 1rem;
	width: 100%;
	min-width: 100px;
	max-width: 200px;
	text-align: center;
	border-radius: 1rem;

	box-shadow: 0px 1px 4px rgba(6, 6, 6, 0.829);
	box-shadow: 0px 1px 4px rgba(6, 6, 6, 0.829);
}

.player-turn .bg.win {
	animation: 1s pulseAnim 0s infinite;
	font-weight: bold;
}

.player-turn .name {
	color: rgb(0, 0, 0);
	font-weight: bold;
}

@keyframes pulseAnim {
	from {
		transform: scale(1);
	}

	40% {
		transform: scale(1.2);
	}

	to {
		transform: scale(1);
	}
}

h1 {
	text-align: center;
	color: #111;
	z-index: 100;
	padding-bottom: 10px;
	width: 100%;
	font-size: 1.5rem;
}

.instructions {
	width: 100%;
	justify-content: center;
	max-height: 100%;
	font-size: 1rem;
}

.settings {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-right: 10%;
	width: 100%;
	height: 100%;
}

.settings .form {
	display: flex;
	flex-direction: column;
	justify-content: center;
	max-width: 475px;
	padding: 1rem;
	font-size: 20px;
	padding-left: 3%;
	padding-right: 3%;
	font-weight: bolder;
}

#players-count {
	margin-bottom: 10px;
}

.settings .form-item {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	width: 260px;
}

.settings .form-item input {
	border-radius: 3px;
	padding: 0.4rem 0.2rem;
	font-weight: lighter;
	font-size: smaller;
	font-style: italic;
}

.settings .form-item .details {
	font-style: italic;
	color: #3e3e3e;
	font-size: 15px;
}

.settings button {
	margin-top: 0.4rem;
	border-radius: 3px;
	padding: 0.8rem;
	font-weight: bold;
	border: none;
	background: #333;
	color: #fff;
	cursor: pointer;
	letter-spacing: 4px;
}

.settings button:hover {
	background: rgb(75, 75, 75);
}

.settings button:active {
	background: rgb(70, 70, 70);
}

.back {
	position: absolute;
	right: 0;
	left: 0;
	top: 0;
	bottom: 0;
	z-index: -1;
}

@media (min-aspect-ratio: 16/9) {
	.back {
		width: 100%;
		height: auto;
	}
}

@media (max-aspect-ratio: 16/9) {
	.back {
		width: auto;
		height: 100%;
	}
}

.player-turn .bg {
	padding: 0.2rem 0.4rem;
	border-radius: 1.2rem;
	font-weight: bold;
	color: black;
	display: flex;
	align-items: center;
}

.timer {
	margin-left: 1rem;
	font-size: 1.2rem;
	color: red;
}

.mute-btn {
	background-color: #333;
	border: none;
	cursor: pointer;
	padding: 10px 15px;
	border-radius: 5px;
}

.mute-btn i {
	color: #ffffff;
	font-size: 24px;
	transition: color 0.3s ease;
}

.mute-btn:hover i {
	color: #fff;
}

/* The message box is shown when the user clicks on the input field */
.warning {
	display: none;
	font-size: 18px;
	color: red;
	position: relative;
	padding: 5px;
}

/* Rankings table styles */
.rankings {
	position: absolute;
	top: 200px;
	/* Adjust as necessary */
	right: 10px;
	/* Adjust as necessary */
	background: #fff;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 5px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.rankings table {
	width: 100%;
	border-collapse: collapse;
}

.rankings th,
.rankings td {
	padding: 10px;
	text-align: center;
	border-bottom: 1px solid #ddd;
}

.rankings th {
	background-color: #4caf50;
	color: white;
}

.rankings td {
	background-color: #f9f9f9;
}

/* Additional styling for the overall container */
#ranking-container {
	display: flex;
	justify-content: center;
	margin-top: 20px;
}

#ranking {
	border-collapse: collapse;
	width: 90%;
	max-width: 600px;
}

#ranking th,
#ranking td {
	text-align: left;
	padding: 8px;
}

#ranking th {
	background-color: #4caf50;
	color: white;
}

#ranking tr:nth-child(even) {
	background-color: #f2f2f2;
}

#ranking tr:hover {
	background-color: #ddd;
}

#ranking td:first-child {
	background: rgb(70, 70, 70);
}

.settings .form-item select {
	border-radius: 3px;
	padding: 0.4rem 0.2rem;
	letter-spacing: 2px;
	font-weight: bold;
	font-size: large;
}

select {
	background: rgb(70, 70, 70);
	color: #ffffff;
}

#myVideo {
	position: fixed;
	right: 0;
	bottom: 0;
	min-width: 100%;
	min-height: 100%;
	z-index: -1;
}

select {
	border-radius: 3px;
	padding: 0.4rem 0.2rem;
	font-weight: bold;
	font-size: large;
	width: 100%;
	margin: 1rem 0rem;
}

.score {
	background-color: rgba(231, 181, 55, 0.979);
	padding: 20px;
	border: #111;
	border-radius: 10px;
	box-shadow: 0px 5px 15px rgba(6, 6, 6, 0.829);
}

.flex {
	width: 100%;
	display: flex;
	justify-content: space-around;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.flex-btn {
	display: flex;
	justify-content: space-around;
	gap: 0.5rem;
}

.flex-btn button {
	margin-top: 0.4rem;
	border-radius: 3px;
	padding: 0.8rem;
	font-weight: bold;
	border: none;
	background: #333;
	color: #fff;
	cursor: pointer;
	letter-spacing: 4px;
}

.flex-btn button:hover {
	background: rgb(75, 75, 75);
}

.whole-background {
	display: flex;
	margin-top: 10%;
	flex-direction: row;
	gap: 1rem;
	background: linear-gradient(135deg,
			rgba(251, 150, 26, 0.979),
			rgba(255, 187, 55, 0.979),
			rgba(252, 132, 72, 0.979));
	border-radius: 10px;
	padding: 10px 20px;
	box-shadow: 0px 5px 15px rgba(6, 6, 6, 0.829);
}

.right-background {
	padding: 20px 50px;
	border-radius: 10px;
	max-width: 370px;
	transition: background-color 0.5s ease;
}

.right-background:hover {
	background-color: rgba(236, 66, 109, 0.329);
}

.button-container {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.start-btn,
.reset-btn {
	flex: 1;
	margin-top: 10%;
}

.error-message {
	margin-top: 5px;
	font-size: 0.9rem;
	font-weight: bold;
	color: #ff4d4d;
	font-family: "Arial", sans-serif;
	text-align: left;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

input[type="number"] {
	-moz-appearance: textfield;
	appearance: textfield;
}

.button {
	margin-top: 20px;
	padding: 10px 10px;
	background: rgb(50, 81, 50);
	color: #fff;
	text-align: center;
	border-radius: 20px;
	text-decoration: none;
	font-weight: bold;
	width: 100%;
	text-align: center;
	display: inline;
}

.button:hover {
	background: rgb(75, 75, 75);
}

.heading {
	text-align: center;
	color: #111;
	z-index: 100;
	padding-bottom: 10px;
	width: 100%;
	font-size: 1.5rem;
	padding: 0;
}

/* Responsive for mobile view */

@media (max-width: 806px) {
	.settings .form {
		padding: 0px;
	}

	.settings .form-item {
		width: 100%;
	}

	.board {
		width: 90vw;
	}

	.flex {
		flex-direction: column;
	}

	.score {
		width: 90%;
		padding: 10px;
	}

	.flex-btn {
		flex-direction: column;
		gap: 0.5rem;
	}

	.whole-background {
		flex-direction: column;
	}

	.button {
		margin-top: 10px;
		padding: 0.5em;
		font-size: 1rem;
	}

	.right-background {
		padding: 0px 10px;
		font-size: 1rem;
	}
}

/* Instructions Page */

/* .instructions-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 100%;
  padding: 15px 30px;
  background-color: rgba(231, 181, 55, 0.979);
  border-radius: 10px;
  box-shadow: 0px 5px 15px rgba(6, 6, 6, 0.829);
  text-align: left;
  line-height: 1.3em;
} */
/* 
.instructions-container h1 {
  margin-bottom: 15px;
} */

/* .instructions-container p {
  margin-bottom: 10px;
  line-height: 1.5;
} */

/* .back-btn {
  margin-top: 10px;
  padding: 10px 20px;
  background: rgb(37, 37, 74);
  color: #fff;
  text-align: center;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  width: 100%;
  text-align: center;
}

.back-btn:hover {
  background: rgb(75, 75, 75);
  text-decoration: underline;
} */

/* Responsive for Tab view */
@media (max-width: 1167px) {
	.settings .form {
		padding: 0px;
	}

	.settings .form-item {
		width: 100%;
	}

	.board {
		width: 90vw;
	}

	.flex {
		flex-direction: column;
	}

	.score {
		width: 90%;
		padding: 10px;
	}

	.flex-btn {
		flex-direction: column;
		gap: 0.5rem;
	}

	.whole-background {
		flex-direction: column;
	}

	.button {
		margin-top: 10px;
		padding: 0.5em;
		font-size: 1rem;
	}

	.right-background {
		padding: 0px 10px;
		font-size: 1rem;
	}
}

@media (max-width: 805px) {
	.instructions-container {
		max-width: 90%;
		padding: 15px 25px;
		line-height: 1.5em;
	}
}

.popup {
	position: fixed;
	top: 54%;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 60px;
	background-color: rgb(209, 233, 255);
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	border-radius: 18px;
	z-index: 1000;
}

.popup-content {
	text-align: center;
}

.popup .close-button {
	position: absolute;
	top: 10px;
	right: 17px;
	cursor: pointer;
	font-size: 24px;
	padding: 5px;
	background-color: transparent;
	border: none;
	outline: none;
}

.hidden {
	display: none;
}


.author .social-icons .social:hover .fa-github{
	color: #2b3137;
}
.author .social-icons .social:hover .fa-discord{
	color: #7289da;
}

.floating-social .social-icon:hover .fa-twitter {
	color:#1DA1F2;
}

.floating-social .social-icon:hover .fa-instagram {
	background-color: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}
.floating-social .social-icon:hover .fa-facebook {
	color: #4267B2;
}
.floating-social .social-icon:hover .fa-linkedin {
	color: #0077b5;
}
