@charset "UTF-8";
@import "fonts.css";
@import "global.css";

:root {
	--green: #4FB1A1;
	--blue: #326199;
	--red: #DF6E5B;
	--yellow: #FCC055;
	--orange: #DF6E5B;

	--yellow-dark: #D3A100;
	--green-dark: #007A4C;
	--blue-dark: #0A4285;
	--red-dark: #D33B21;

	--button-color: #28a745;

	--board-size: 600px;
	--tile-size: 40px;
	--pawn-size: 60px; /* Size of the pawn in px */
}
body { font-family: sans-serif; text-align: center; margin: 0; background: #f5f5f5; }

.shortcut-line {
	display: none;
}
.page {
	display: flex;
	max-width: 1440px;
	width: 100%;
	flex-direction: column;
	align-items: flex-end;
	gap: 48px;
	margin: 0 auto;
}
.start-screen {
	align-items: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 24px;
	padding: 48px;
	border-top: 1px solid #848484;
	max-width: 1440px;
	width: 100%;
	margin: 0 auto;
}
.start-screen .container-horizontal {
	display: flex;
	flex-direction: row;
	align-items: center;
	border-radius: 34px;
	border: 1px solid var(--orange);
	background: #EEE;
}
.start-screen .container-horizontal .title {
	font-size: 15px;
	font-weight: 700;
}
.start-screen .instructions {
	display: flex;
	max-width: 100%;
	padding: 24px;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	flex-shrink: 0;
	border-radius: 24px;
	border: 1px solid var(--orange);
	background: #F7F7F7;
}
.start-screen .instructions .text {
	text-align: left; 
	max-width: 600px; 
	line-height: 15px; 
	font-size: 15px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}
.start-screen .instructions .text div {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 6px;
	gap: 8px;
}
.start-screen .selections {
	display: flex;
	padding: 0px 20px;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 24px;
	flex: 1 0 0;
	align-self: stretch;
}
.start-screen .selections img {
	width: 50px;
	height: 50px;
}
#gameModeSelect {
	margin-top: 10px;
	color:black;
	font-size: 17px;
	font-weight: 700;
}
.navigation {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	align-self: stretch;
	padding: 48px;
	justify-content: space-between;
}
.navigation .user-container {
	display: flex;
	width: 481px;
	justify-content: flex-end;
	align-items: center;
	gap: 22px;
}
.navigation .userpawn-container {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 6px;
}
.navigation .player-container {
	display: flex;
	align-items: flex-start;
	gap: 2px;
	flex-direction: column;
	font-size: 14px;
}
.navigation .player-container input[type=submit] {
	border: none;
	background: none;
	cursor: pointer;
	font-size: 16px;
	padding: 0;
}
.navigation .pawn-icon {
	width: 38px;
	height: 38px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-weight: bold;
	color: #333;
}
.navigation .menu-container {
	position: relative;
}
.navigation .menu {
	display: none;
	flex-direction: column;
	gap: 8px;
	position: absolute;
	top: 100%;
	right: 0;
	padding: 12px;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	border-top: 1px solid #909090;
	border-bottom: 1px solid #909090;
	background: #E1E1E1;
	z-index: 999;
	width: 100px;
}
.navigation .menu a {
	color: #000;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	text-align: left;
}
.navigation .menu a:hover {
	text-decoration: underline;
}
.navigation .menu.open {
	display: flex;
}
#gameModeIndicator {
	position: relative;
	display: inline-block;
	font-size: 14px;
	font-weight: 700;
}
#gameModeIndicator.easy {
	color: #155724;
}
#gameModeIndicator.hard {
	color: #721c24;
}
#instructionsModal {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	padding: 30px;
	border-radius: 10px;
	box-shadow: 0 0 15px rgba(0,0,0,0.3);
	z-index: 1003;
	max-width: 500px;
	text-align: left;
}

#gameContainer {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	max-width: 1440px;
	margin: 0 auto;
	margin-top: -70px;
}
.page-guest #gameContainer {
	margin-top:0;
}
.sideBox {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	align-self: stretch;
	background: none !important;
	border: none !important;
}
.sidebox .open {
	
}
.sideBox .title {
	font-size: 24px;
	text-align:left;
	align-self: stretch;
	padding: 0 16px;
	margin: 0;
}
#endScreen {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	max-width: 1440px;
	margin: 0 auto;
	gap: 24px;
}
.game-container {
	display: flex;
	flex-direction: row;
	gap: 24px;
	align-self: stretch;
	max-width: 1440px;
	justify-content: center;
	padding: 12px;
}
#board {
	width: var(--board-size);
	height: var(--board-size);
	margin: 20px auto;
	position: relative;
	border-radius: 50%;
	background:url("../images/board.png") no-repeat center/cover;
	transition: all 0.3s ease-in-out;
}
.tile {
	width: var(--tile-size);
	height: var(--tile-size);
	border-radius: 50%;
	position: absolute;
	display: flex;
	color:white;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	z-index: 2;
	transform: translate(-50%, -50%);
}
.tile.green {
	background: var(--green-dark);
}
.tile.blue {
	background: var(--blue-dark);
}
.tile.red {
	background: var(--red-dark);
}
.tile.yellow {
	background: var(--yellow-dark);
}
.tile.white {
	color:black;
}
.pawn {
	width: var(--pawn-size);
	height: var(--pawn-size);
	border-radius: 50%;
	border: 3px solid white;
	position: absolute;
	z-index: 10;
	transition: top 0.4s ease, left 0.4s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5px;
	box-sizing: border-box;
	background: rgba(255,255,255,0.7);
}
.pawn-choice.selected {
	outline: 3px solid black;
}
#pawnStep {
	position: absolute;
	color: black;
	font-weight: bold;
	pointer-events: none;
	bottom: 5px;
	width: 100%;
	text-align: center;
	font-size: 14px;
	display:none;
}
.blue { background: var(--blue); }
.red { background: var(--red); }
.green { background: var(--green); }
.yellow { background: var(--yellow); }
.white { background: #fff; border: 1px solid #ccc; }

.game-header {
	width: 100%;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
}
.game-header .line {
	background:#848484;
	display: flex;
	height: 1px;
	justify-content: center;
	flex: 1 0 0;
}
#controls { 
	position: relative;
	margin: 0 12px;
}
#controls .text {
	font-size: 23px;
	font-weight: 500;
	color: #333;
	margin-top: -33px;
	width: 100%;
	padding-bottom: 12px;
}
#controls #timer {
	font-size: 64px;
	font-weight: 700;
	color: #333;
}
#questionBox {
	background: none;       /* Background color */
	padding: 12px 0px;      /* Spacing */
	z-index: 1001;           /* Above board and modal overlay */
	min-width: 320px;            /* Fixed or max width */
	display: none;           /* Hidden by default */
	text-align: center;      /* Center text */
	font-family: sans-serif;
	transition: opacity 0.3s ease;
	opacity: 0;
	text-align: left;
	border-radius: 24px;
	border: 1px solid var(--orange, #DF6E5B);
}
.sideBox.blue #questionBox {
  border-color: var(--blue);
}
.sideBox.red #questionBox {
  border-color: var(--red);
}
.sideBox.green #questionBox {
  border-color: var(--green);
}
.sideBox.yellow #questionBox {
  border-color: var(--yellow);
}
.sideBox.white #questionBox {
  border-color: #ddd;
}
.sideBox .answer-info {
	font-weight: 700;
	font-size: 20px;
}
.sideBox.blue .answer-info {
	color: var(--blue);
}
.sideBox.red .answer-info {
	color: var(--red);
}
.sideBox.green .answer-info {
	color: var(--green);
}
.sideBox.yellow .answer-info {
	color: var(--yellow);
}
#questionBox h3 {
	font-size: 27px;
	text-align: left;
	margin: 0;
	padding: 0 24px;
	font-weight: 300;
}
#questionBox #questionText {
	font-size: 16px;
	text-align: left;
	padding: 0 24px 12px 24px;
}
#options {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	align-self: stretch;
}
#options button {
	padding: 12px;
	cursor: pointer;
	transition: background-color 0.3s ease;
	border: 0;
	background: rgba(210, 210, 210, 0.25);
	font-size: 16px;
	align-self: stretch;
	text-align: left;
}
#options button:hover {
	background-color: #d0d0d0;
}
#options button.answer-btn.correct {
	background-color: #c8e6c9; /* Light green */
}
#options button.answer-btn.correct::before {
	content: '✅';
	position: absolute;
	right: 40px;
	display: inline-block;
}
#options button.answer-btn.wrong {
	background-color: #ffcdd2; /* Light red */
}
#options button.answer-btn.wrong::before {
	content: '❌';
	position: absolute;
	right: 40px;
	display: inline-block;
}
#diceContainer {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 20;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap:24px;
	color: black;
	font-size: 22px;
}

#rollButton {
	pointer-events: auto;
	width: 70px;
	height: 70px;
	border: none;
	border-radius: 12px;
	background-color: white;
	box-shadow: 0 4px 10px rgba(0,0,0,0.4);
	cursor: pointer;
	animation: pulse 1.5s infinite;
	transition: transform 0.2s ease;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: 4px;
	padding: 8px;
}

.dot {
	width: 10px;
	height: 10px;
	background-color: black;
	border-radius: 50%;
	align-self: center;
	justify-self: center;
}

#rollButton:hover {
	transform: scale(1.1);
}

/* 🎯 Animation */
@keyframes pulse {
	0% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.7); }
	70% { box-shadow: 0 0 0 20px rgba(255, 204, 0, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0); }
}

@keyframes shake {
	0% { transform: translate(0, 0); }
	25% { transform: translate(-3px, 0); }
	50% { transform: translate(3px, 0); }
	75% { transform: translate(-3px, 0); }
	100% { transform: translate(0, 0); }
}

.shake {
	animation: shake 0.4s;
}
#modalOverlay {
	display: none;
	position: fixed;
	top:0; left:0; right:0; bottom:0;
	background: rgba(0,0,0,0.4);
	z-index: 999;
}
#resultModal {
	display: none;
	position: fixed;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	border-radius: 10px;
	padding: 30px 40px;
	box-shadow: 0 0 15px rgba(0,0,0,0.3);
	z-index: 1000;
	min-width: 300px;
	text-align: center;
}
.match-pairs-grid {
	display: grid;
	grid-template-columns: repeat(3, 60px);
	gap: 10px;
	margin-top: 10px;
	justify-content: center;
}

.match-card {
	font-size: 24px;
	height: 60px;
	width: 60px;
	cursor: pointer;
	border-radius: 8px;
	background: #f9f9f9;
	border: 1px solid #ccc;
}

.shortcut-line {
	position: absolute;
	/* background: gold; */
	opacity: 0.2;
	height: 2px;
	z-index: 0;
	transition: width 2s ease-out;
	transform-origin: 0 0;
}

@keyframes roll3d {
	0% { transform: rotateX(0deg) rotateY(0deg); }
	25% { transform: rotateX(180deg) rotateY(90deg); }
	50% { transform: rotateX(360deg) rotateY(180deg); }
	75% { transform: rotateX(540deg) rotateY(270deg); }
	100% { transform: rotateX(720deg) rotateY(360deg); }
}

#rollButton.rolling {
	animation: roll3d 1s ease;
}
#progressTracker {
	align-self: stretch;
}
.dots {
	gap: 6px;
	display: flex;
}
#progressDots {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	align-self: stretch;
}
.progress-group {
	border-radius: 24px;
	font-size: 20px;
	font-weight:500;

	background:none;
	display: flex;
	width: 170px;
	padding: 12px;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}
.progress-group.blue { border: 1px solid var(--blue); color: var(--blue); }
.progress-group.green { border: 1px solid var(--green); color: var(--green); }
.progress-group.yellow { border: 1px solid var(--yellow); color: var(--yellow); }
.progress-group.red { border: 1px solid var(--red); color: var(--red); }

.progress-dot {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ccc;
}
#questionBox.fadeOutZoom {
	transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.4,2,.6,1);
	opacity: 0 !important;
	transform: scale(0.8);
	pointer-events: none;
}
.inGameNav {
	display: none;
}
#pawnSelection {
	gap: 4px;
	display:flex; 
	justify-content:center;
	flex-direction: row;
}
.pawn-choice {
	border-radius: 8px;
	cursor: pointer;
	border: 2px solid #88888800;
	transition: box-shadow 0.2s, border 0.2s;
	box-shadow: 0 0 3px rgba(0,0,0,0.0);
	margin: 0 6px;

	display: flex;
	padding: 3px;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 1 0 0;
}
.pawn-choice.selected,
.pawn-choice:checked {
	border: 3px solid #fff;
	box-shadow: 0 0 6px 2px #2196f3;
}
.tile.shortcut-white {
	background: #fff !important;
	border: 2px solid gold;
	box-shadow: 0 0 7px gold;
	z-index: 2;
}
.tile.greyed-out {
	background: #bbb !important;
	filter: grayscale(1);
	opacity: 0.5;
	pointer-events: none;
}
.shortcut-dot {
	background: #fff !important;
	border: 2px solid gold;
	box-shadow: 0 0 5px gold;
	border-radius: 50%;
	position: absolute;
	z-index: 2;
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
}
.shortcut-dot {
	display: none;
}
.tile.current-tile {
	box-shadow: 0 0 10px 4px gold;
	z-index: 2;
}
.tile.completed-tile {
	/*filter: grayscale(1);
	opacity: 0.5;*/
}
.tile.shortcut-white.blue {
	color: var(--blue);
}
.tile.shortcut-white.red {
	color: var(--red);
}
.tile.shortcut-white.green {
	color: var(--green);
}
.tile.shortcut-white.yellow {
	color: var(--yellow);
}

/* Login */
.login-form {
	margin-top: 48px;
}
.login-form h2 {
	font-size: 28px;
	font-weight: 700;
	margin-bottom: 12px;
}
.theform {
	margin-top: 60px;
	padding: 24px;
	/* background: white; */
	border-radius: 24px;
}
.theform input {
	margin-bottom: 12px;
}

.start-screen h2 {
	margin-top:0;
	margin-bottom: 24px;
}

.answerButton:disabled {
  opacity: 0.6;
  pointer-events: none;
}
#rollButton:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* For screens below 768px do the  */
@media screen and (max-width: 767px) {
	:root {
        --board-size: 92vw;
		--tile-size: 28px;
    }
	h3 {
		font-size: 20px !important;
	}
	.navigation {
		padding: 12px;
		justify-content: space-between;
	}
	.navigation .pawn-icon {
		display: none;
	}
	#instructionsModal {
		width: 70%;
	}
	#gameContainer {
		margin-top:0;
		margin: 6px;
		gap: 6px;
		margin-top: -18px;
	}
	.game-container {
		flex-direction: column;
		gap: 32px;
		position: relative;
		padding:0;
		margin-top: 6px;
	}
	#controls .text {
		margin-top:0;
		font-size: 18px;
		padding-bottom:0;
	}
	#controls #timer {
		font-size: 48px;
	}
	#controls .text img,
	#controls .text br {
		display: none;
	}
	#progressDots {
		flex-direction: row;
		align-items: flex-start;
		gap: 4px;
		align-self: stretch;
	}
	.progress-group {
		padding: 6px;
		gap: 4px;
		flex: 1 0 0;
		width: auto;
		font-size: 14px;
		border-radius: 12px;
	}
	.progress-group .dots {
		gap: 4px;
	}
	.progress-dot {
		width: 16px;
		height: 16px;
		aspect-ratio: 1/1;
	}
	.start-screen {
		padding: 12px;
		padding-top: 24px;
		gap: 24px;
		width: unset;
	}
	.start-screen h2 {
		margin: 0;
	}
	.start-screen .container-horizontal {
		flex-direction: column;
	}
	.start-screen .instructions {
		padding: 12px;
	}
	.start-screen .selections {
		padding: 18px;
		gap: 24px;
	}
	#startGameButton {
		margin-top: -30px;
	}
	.sideBox {
		position: fixed;
		right: 0;
		left: 0;
		bottom: 0;
		background: rgba(255, 255, 255, 0.85) !important;
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
		padding: 12px !important;
		z-index: 100;
		gap: 12px;

		/* Animation initial state */
		transform: translateY(100%);
		opacity: 0;
		transition: transform 0.35s cubic-bezier(.4,1.4,.6,1),
		            opacity 0.3s ease;
	}

	/* When opened */
	.sideBox.open {
		transform: translateY(0);
		opacity: 1;
	}
	#board {
	    width: var(--board-size);
	    height: var(--board-size);
	    /* transform: scale(0.6);  */
	    transform-origin: top left;
	    margin: 0 auto;
	}
	
	.navigation .logo {
		width: 140px;
	}
	#questionBox {
		align-self: stretch;
	}
	#diceContainer {
		transform: translate(-50%, -50%) scale(1.5);
		gap: 12px;
		font-size: 16px;
		font-weight: bold;
	}
	.tile {
		font-size: 13px;
	}
	#rollButton {
		transform: scale(0.7 );
	}
	#resultModal {
		max-width: 90%;
		min-width: unset;
	}
	.sideBox .title {
		display: none;
	}
}