@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&family=Shantell+Sans:wght@500&display=swap");

*,
*::after,
*::before {
	box-sizing: border-box;
	font-family: Montserrat;
	/* margin: 0; */
	/* padding: 0; */
}

body {
	background-color: #fff;
	display: flex;
	flex-direction: column;
	margin: 0;
	/* padding: 1em; */
	font-size: clamp(0.5rem, 2.5vh, 1.5rem);
	color: #181818;

	min-height: 100vh;
	display: flex;
	flex-direction: column;
	/* height: -webkit-fill-available; */
	overflow-y: auto;
}

header {
	/* background-color: #66d9e8; */
	/* position: absolute; */
	/* left: 50vw; */
	/* transform: translateX(-50%); */
	border-bottom: solid 1px #303132;
	width: 80%;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.sub-title {
	text-align: center;
	font-weight: 700;
	font-size: large;
}
.title {
	font-size: clamp(0.5rem, 5vmin, 2.8rem);
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
	margin-bottom: 10px;
	white-space: nowrap;
}
.bgImage {
	opacity: 0.1;
	position: fixed;
}
.keyboard {
	margin: 2rem auto;
	/* position: relative; */
	/* bottom: 8vh; */

	display: grid;
	grid-template-columns: repeat(22, minmax(auto, 1fr));
	grid-auto-rows: 7.3vh;
	gap: 0.25em;
	justify-content: center;
	width: 90vw;
	max-width: 50rem;

	margin-bottom: 0;
	/* left: 5vw; */
}

.key {
	font-size: min(3vmin, 3vh);
	grid-column: span 2;
	border: none;
	padding: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: hsl(var(--hue, 214.29), var(--saturation, 8.64%), calc(var(--lightness-offset, 0%) + var(--lightness, 84.12%)));
	color: #303132;
	fill: #303132;
	text-transform: uppercase;
	font-weight: bold;
	border-radius: 0.25em;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.2s;
}

.key.large {
	grid-column: span 3;
}

.key > svg {
	width: 6vmin;
	height: 6vmin;
}

.key:hover,
.key:focus {
	--lightness-offset: -19%;
}

.key.wrong {
	--hue: 200;
	--saturation: 2.4%;
	--lightness: 48.24%;
	color: white;
}

.key.wrong-location {
	--hue: 44;
	--saturation: 89%;
	--lightness: 58%;
	color: white;
}

.key.correct {
	background-color: #538d4e;
	color: white;
}

.guess-grid {
	display: grid;
	justify-content: center;
	align-content: center;
	/* flex-grow: 1; */
	grid-template-columns: repeat(5, min(15vmin, 3.3rem));
	grid-template-rows: repeat(6, min(15vmin, 3.3rem));
	gap: 0.25em;
	margin: 0 auto;
	margin-bottom: 0;
	/* max-height: 60vh; */
	/* background-image: url("../images/sampleimage.jpg"); */
	/* background-repeat: no-repeat; */
	/* background-position: 50%; */
	/* background-size: auto 70%; */
}

.tile {
	font-size: 1.5em;
	color: #d3d6da;
	border: 0.03em solid rgba(0, 0, 0, 0.295);
	border-radius: 13%;
	text-transform: uppercase;
	font-weight: bold;
	display: flex;
	justify-content: center;
	align-items: center;
	user-select: none;
	transition: transform 250ms linear;
}

.tile[data-state="active"] {
	opacity: 1;
	color: #181818;
	border-color: rgba(0, 0, 0, 0.695);
}

.tile[data-state="wrong"] {
	border: none;
	color: white;
	background-color: #787c7e;
}

.tile[data-state="wrong-location"] {
	border: none;
	color: white;
	background-color: hsl(44, 89%, 58%);
}

.tile[data-state="correct"] {
	border: none;
	color: white;
	background-color: #538d4e;
}

.tile.shake {
	animation: shake 250ms ease-in-out;
}

.tile.dance {
	animation: dance 500ms ease-in-out;
}

.tile.flip {
	transform: rotateX(90deg);
}

@keyframes shake {
	10% {
		transform: translateX(-5%);
	}

	30% {
		transform: translateX(5%);
	}

	50% {
		transform: translateX(-7.5%);
	}

	70% {
		transform: translateX(7.5%);
	}

	90% {
		transform: translateX(-5%);
	}

	100% {
		transform: translateX(0);
	}
}

@keyframes dance {
	20% {
		transform: translateY(-50%);
	}

	40% {
		transform: translateY(5%);
	}

	60% {
		transform: translateY(-25%);
	}

	80% {
		transform: translateY(2.5%);
	}

	90% {
		transform: translateY(-5%);
	}

	100% {
		transform: translateY(0);
	}
}

.alert-container {
	position: fixed;
	top: 10vh;
	left: 50vw;
	transform: translateX(-50%);
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.alert {
	color: white;
	pointer-events: none;
	background-color: #003366;
	padding: 0.75em;
	border-radius: 0.25em;
	opacity: 1;
	transition: opacity 500ms ease-in-out;
	margin-bottom: 0.5em;
}

.alert:last-child {
	margin-bottom: 0;
}

.alert.hide {
	opacity: 0;
}

.modal {
	opacity: 0;
	visibility: hidden;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: #e5eaef;
	color: #181818;
	padding: 2rem;
	border-radius: 5px;
	box-shadow: 0 3rem 5rem rgba(0, 0, 0, 0.3);
	z-index: 10;
	font-size: min(3vmin, 3vh);
	text-align: center;
	transition: opacity 0.5s, visibility 0s;
	line-height: 1.3;
	width: 90vw;
	max-width: 500px;
}

.overlay {
	position: absolute;
	visibility: hidden;
	opacity: 0;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(3px);
	z-index: 5;
	transition: opacity 0.5s, visibility 0s;
}

.reset {
	margin: 2em;
	padding: 1em;
	font-size: min(3vmin, 3vh);
	color: white;
	fill: white;
	text-transform: uppercase;
	border-radius: 0.25em;
	cursor: pointer;
	user-select: none;
	background-color: #003366;
	border: none;
	font-weight: 700;
}

.modal_text {
	font-weight: 800;
	letter-spacing: 1.5px;
}

.world_was {
	color: #003366;
	font-size: 2.5rem;
	letter-spacing: 2px;
}

.nwi {
	margin-bottom: 0;
}

.timeLeft {
	margin-top: 0;
	margin-bottom: 0;
	color: #003366;
	font-size: 2.5rem;
	letter-spacing: 2px;
	font-weight: 800;
}

.modal-2 {
	text-align: left;
}

.modal-2 p {
	font-size: 1.2rem;
}

.modal-2 * {
	margin: 0;
}

.cross-icon {
	position: absolute;
	right: 10px;
	top: 10px;
	width: 24px;
	height: 24px;
	cursor: pointer;
}

.modal_p {
	margin-bottom: 1.2rem;
}

.example {
	margin-bottom: 0.9rem;
}

.modal_title {
	font-weight: 800;
	letter-spacing: 1.5px;
	margin-bottom: 2rem;
}

.btn-control-holder {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	margin-top: 10px;
	margin-bottom: 20px;
}

.btn {
	border: none;
	border-radius: 0.25em;
	background-color: #d3d6da;
	color: #181818;
	padding: 10px 20px 10px 20px;
	cursor: pointer;
}

.btn-conf {
	background-color: #003366;
	color: #fff;
}

.btn-reset-guesses {
	background-color: #003366;
	color: white;
	border: none;
	margin: 0;
	/* font-size: smaller; */
}

a.btn {
	display: inline-block;
	font-size: 13px;
	text-decoration: none;
}

.hiddenHeader {
	opacity: 0;
	cursor: auto;
}
.inp-id {
	border: none;
	border-radius: 0.25em;
	background-color: #d3d6da;
	color: #181818;
	padding: 10px 5px;
}

.dropdown-content {
	display: none;
	position: absolute;
	background-color: #f1f1f1;
	min-width: 90px;
	overflow: auto;
	box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
	z-index: 1;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	border-radius: 0.25em;
	max-height: 200px;
}

.dropdown-option {
	width: 100%;
	border-radius: 0;
}
.dropdown-option:hover {
	background-color: rgb(70, 70, 74);
}
.show {
	display: flex;
}

.btn-choose {
	border-radius: 0.25em;
}

.more-info {
	text-align: center;
	padding-left: 100px;
	padding-right: 100px;
}

footer {
	width: 80%;
	margin: 0 auto;
	font-size: 16px;
	text-align: center;
}

.credits {
	text-align: center;
	margin: 0 auto;
}

.credits a {
	color: #339af0;
}
.btn-green {
	margin-top: 30px;
	background-color: #003366;
	color: #fff;
}
.switch {
	position: relative;
	display: inline-block;
	width: 60px;
	height: 34px;
}

.switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	-webkit-transition: 0.4s;
	transition: 0.4s;
}

.slider:before {
	position: absolute;
	content: "";
	height: 26px;
	width: 26px;
	left: 4px;
	bottom: 4px;
	background-color: white;
	-webkit-transition: 0.4s;
	transition: 0.4s;
}

.switch input:checked + .slider {
	background-color: #2196f3;
}

.switch input:focus + .slider {
	box-shadow: 0 0 1px #2196f3;
}

.switch input:checked + .slider:before {
	-webkit-transform: translateX(26px);
	-ms-transform: translateX(26px);
	transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
	border-radius: 34px;
}

.slider.round:before {
	border-radius: 50%;
}

.setting-row {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 3rem;
}
.icon {
	width: 30px;
}

.header-button-holder {
	display: flex;
	gap: 20px;
}
.btn-how,
.btn-settings,
.btn-stats {
	padding: 0;
	background: none;
}

.stats-holder {
	display: flex;
	gap: 2.3rem;
}

.stats-holder strong {
	font-size: 1.8rem;
}

.stats-holder span {
	font-size: 1rem;
}

.stat-holder {
	width: 7rem;
	margin-bottom: 2.4rem;
}

.modal-3 {
	max-width: none;
	padding: 2rem 5rem 3rem 5rem;
}

.modal-3 h3 {
	margin-top: 0;
	margin-bottom: 4rem;
}

.modal-3 p {
	margin: 0;
}

.stat-end {
	display: flex;
	align-items: center;
}

.stat-end span {
	width: 13px;
}

.ends {
	background-color: #003366;
	border-radius: 999px;
	height: 12.5px;
}

.stat-label {
	margin-right: 2.5rem;
}

.stat-end span:not(.stat-label) {
	margin-left: 1rem;
}

/* Adjust modal styles for mobile devices */

@media (max-width: 600px) {
	.modal {
		padding: 1rem;
		font-size: min(4vmin, 4vh);
	}
	.modal .cross-icon {
		width: 20px;
		height: 20px;
	}
	.modal .btn {
		font-size: min(3vmin, 3vh);
	}
	.modal-2 p,
	.modal-2 .example,
	.modal-2 .modal_p {
		font-size: min(3.5vmin, 3.5vh);
	}
	.modal .world_was,
	.modal .timeLeft {
		font-size: min(4.5vmin, 4.5vh);
	}
}

/* Ensure other elements within modals are responsive */
.modal .btn {
	margin: 1rem 0;
	padding: 0.5rem 1rem;
	font-size: min(3vmin, 3vh);
}

.modal .cross-icon {
	position: absolute;
	right: 10px;
	top: 10px;
	width: 24px;
	height: 24px;
	cursor: pointer;
}

/* Overlay adjustments for mobile */
.overlay {
	position: fixed;
	visibility: hidden;
	opacity: 0;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(3px);
	z-index: 5;
	transition: opacity 0.5s, visibility 0s;
}
.hidden {
	/* display: none; */
	opacity: 1;
	visibility: visible;
}

.modal-5 form {
	font-size: clamp(0.5rem, 1rem, 2rem);
	flex-wrap: nowrap;

	display: flex;
	flex-direction: column;
}

.modal-5 .modal_title {
	font-size: 1.6rem;
	margin-top: 0;
	color: #003366;
}
.modal-5 .modal_text {
	font-size: 1rem;
}

.modal input {
	border: 1px solid #919191;
	border-radius: 0.25em;
	background-color: #e5eaef;
	color: #181818;
	padding: 5px 2.5px;

	transition: all 0.3s;

	margin-left: 1rem;
}

.modal input:focus {
	outline: 2px solid #003366;
}

.modal select {
	border: 1px solid #919191;
	border-radius: 0.25em;
	background-color: #e5eaef;
	color: #181818;
	padding: 5px 2.5px;

	transition: all 0.3s;

	margin-left: 1rem;
}

.modal select:focus {
	outline: 2px solid #003366;
}
/* ////////////////////////////// */
/* ////////////////////////////// */
/* ////////////////////////////// */

.modal-5 {
	overflow: auto;
}
.modal-5 form {
	max-width: 100%; /* Ensures form fits within modal */
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.modal-5 form div {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.modal-5 label:not(.marketingPermissionLabel) {
	flex: 0 0 120px; /* Fixed width for larger screens */
	max-width: 120px;
	font-weight: 600;
}

.modal-5 input,
.modal-5 select {
	flex: 1;
	padding: 0.5rem;
	border: 1px solid #919191;
	border-radius: 4px;
	background-color: #e5eaef;
	color: #181818;
	box-sizing: border-box;
	margin-left: 0;

	min-width: 0;
	max-width: 100%;
}

.modal-5 input:focus,
.modal-5 select:focus {
	outline: 2px solid #003366;
}

.modal-5 .modal_text {
	margin-bottom: 1rem;
	font-weight: bold;
	text-align: center;
}

.modal-5 .btn {
	width: 100%;
	margin: 1rem 0 0;
	padding: 0.75rem;
	font-size: 1rem;
	font-weight: bold;
	background-color: #003366;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	text-align: center;
}

/* ///////////////////////////////// */

.modal .btn {
	margin: 1rem 0;
	padding: 0.5rem 1rem;
	font-size: min(3vmin, 3vh);
	background-color: #003366;
	color: white;
}

.footer {
	/* position: fixed;
	bottom: 0.1rem; */

	font-size: 0.9rem;
	display: flex;
	justify-content: space-between;
	align-items: center;

	width: 100%;

	padding: 0 1rem;
	margin-top: 1rem;
	margin-bottom: 1rem;
}

.footer a {
	color: #003366;
}
@media (max-height: 800px) {
	.guess-grid,
	.keyboard {
		transform: scale(0.9); /* Scale down slightly to fit */
	}
}

.text-hidden {
	display: none;
}
