/* .demo-wrapper { */
  /* width: 100%; */
  /* height:100%; */
  /* perspective: 3300px; */
  /* position: relative; */
/* } */
/* .form-control  { background: #f2fffe; border-radius: 18px; } */
/* .error, .red { color: red; } */
/* .dashboard { */
  /* margin: 0 auto; */
  /* width: 80%; */
  /* padding: 0; */
  /* opacity:1; */
  /* animation: start 1s ease-out forwards; */
/* } */
/* .full-width { width: 100%; } */
/* .redtext{color: rgb(255, 64, 64); font-weight: bold;} */
/* #loading{ */
	 /* position: fixed; */
	 /* display: none; */
	 /* top: 0; */
	 /* left: 0; */
	 /* right: 0; */
	 /* bottom: 0; */
	 /* text-align: center; */
	 /* background-color: rgba(0,0,0,0.7); */
	 /* height: 100%; */
	 /* width: 100%; */
	 /* z-index: 9; */
/* } */
/* #loading span{ */
	/* color: #fff; */
	/* position: absolute; */
	/* top: 50%; */
	/* left: 0; */
	/* right: 0; */
	/* bottom: 0; */
	/* display: inline-table; */
	/* width: 100%; */
	/* font-size: 17px; */
	/* font-weight: bold; */
/* } */
/* .btn-yellow { background-color:#ffc107; color: #fff; border-radius: 18px; font-weight: bold; border:1px solid #ffc107; width: 100%; cursor: pointer;} */
/* .btn-yellow:hover { background-color:#ffc107; } */
/* @media(max-width: 768px){ */
	/* .dashboard{width: 100%;} */
/* } */
/* .display_none{display: none;} */
/*------------------------ New Css ------------------------*/
.math_cross {
	width: 50%;
	margin: 0 auto;
	min-height: auto;
    height: auto;
	padding: 0;
	background: #E6E6E6;
	position: relative;
	padding-bottom: 15px;
}

@media(max-width: 1024px){
	.math_cross{
		width: 100% !important;
	}
	.mc_input_div{
		width: 100% !important;
	}
}

.math_cross .header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
	flex-wrap: wrap;
	gap: 15px;
}

.math_cross .timer {
	margin-left: 15px;
	/* background: #231F20; */
	/* color: white; */
	/* padding: 15px 25px; */
	/* border-radius: 15px; */
	/* font-size: 18px; */
	/* font-weight: bold; */
}

.math_cross .timer-label {
	font-size: 20px;
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    text-align: center;
}

.math_cross .timer-value {
	background: #231F20;
    color: white;
    padding: 5px 25px;
    border-radius: 15px;
    font-size: 30px;
    font-weight: bold;
}

.math_cross .give-buttons {
	display: flex;
	gap: 0px;
}

.math_cross .left_div {
	margin: auto;
    text-align: center;
	cursor: pointer;
}

.math_cross .left-label {
	font-size: 20px;
    display: block;
    margin-bottom: 0px;
    font-weight: 500;
    text-align: center;
}

.left-count {
	font-size: 11px;
	display: block;
	margin-top: 3px;
}

.crossword-grid {
	display: inline-grid;
	gap: 2px;
	background: #000;
	padding: 2px;
	margin-bottom: 30px;
}

.cell {
	width: 70px;
	height: 70px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.2s;
	/* pointer-events: none; */
}

.cell.grey {
	/* background: #231F20; */
	background: var(--colorbox-grey);
	cursor: default;
}

.cell.white {
	/* background: #FFFFFF; */
	background: var(--colorbox-notdone);
}

.cell.working {
	/* background: #EBFCA4; */
	background: var(--colorbox-working) !important;
}

.cell.correct {
	/* background: #DB9CD2; */
	background: var(--colorbox-correctvalue);
}

.cell.wrong {
	/* background: #F72D3C; */
	background: var(--colorbox-wrongvalue);
	color: white;
}

.cell-number {
	position: absolute;
	top: 3px;
	left: 5px;
	font-size: 14px;
	font-weight: bold;
	color: #231F20;
}

.cell.grey .cell-number {
	color: #666;
}

.clue-section {
	background: #f8f9faa8;
	padding: 25px;
	border-radius: 15px;
	display: flex;
	justify-content: space-between;
	margin: 15px;
	margin-bottom: 0px;
}

.clue-header {
	font-size: 28px;
	font-weight: bold;
	margin-bottom: 15px;
	color: #231F20;
}

.clue-text {
	font-size: 18px;
	line-height: 1.6;
	margin-bottom: 20px;
	color: #333;
	white-space: pre-line;
	margin-top: -30px;
    font-weight: 500;
}

.answer-section {
	/* display: flex; */
	/* gap: 15px; */
	align-items: center;
	/* flex-wrap: wrap; */
}

.answer-input {
	padding: 11px;
    font-size: 24px;
    border: 2px solid #000;
    font-weight: bold;
    text-align: center;
    width: 300px;
	margin-bottom: 25px;
}

.action-btn {
	padding: 12px 12px;
	border: none;
	border-radius: 10px;
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s;
	color: #000;
	border: 2px solid #000;
	margin-bottom: 12px;
}

.switch-btn {
	background: #6CB4EF;
	margin-right: 5px;
}

.enter-btn {
	background: #B1E29A;
}

.action-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.feedback {
	text-align: center;
	margin-top: 20px;
	padding: 20px;
	border-radius: 10px;
	font-size: 20px;
	font-weight: bold;
}

.feedback.correct {
	background: #8BC34A;
	color: white;
}

.feedback.wrong {
	background: #F72D3C;
	color: white;
}

.feedback-icon {
	font-size: 48px;
	margin-bottom: 10px;
}

.math_cross .progress {
	text-align: center;
	font-size: 18px;
	font-weight: bold;
	color: #231F20;
	margin-top: 20px;
	padding: 15px;
	background: #f0f0f0;
	border-radius: 10px;
}

.complete-message {
	text-align: center;
	font-size: 32px;
	font-weight: bold;
	color: #8BC34A;
	padding: 40px;
	background: #f8f9fa;
	border-radius: 15px;
	margin-top: 20px;
}

.hidden {
	display: none;
}

.math_cross .progress-container {
  width: 60px;
  height: 160px;
  background-color: #bfbfbf;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 2px solid #333;
      margin-bottom: 108px;
}

.math_cross .progress-bar {
  width: 100%;
  height: 0%;
  background-color: #a8a2ff;
  transition: height 0.5s ease;
  border-top: 2px solid #333;
}




/* Overall wrapper */
.snail-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* "Correct" text and checkmark */
.top-text {
  text-align: center;
  margin-bottom: -75px;
  margin-right: 100px;
}

/* Middle section with snail and progress bar */
.math_cross .progress-section {
  display: flex;
  align-items: flex-end;
  gap: 15px;
}

/* Snail and bubble area */
.snail-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.snail-img {
  width: 150px; /* Adjust size as needed */
  height: auto;
  margin-right: -40px;
}

/* Speech bubble */
.speech-bubble {
  position: absolute;
  top: -40px;
  right: 10px;
  background-color: #232323;
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.2;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 75%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: #232323 transparent transparent transparent;
}

.mc_right_wrong_img{
	visibility: hidden;
}

#math_cross_modal{ top: 25%; color: #000; font-weight: bold; font-size: 15px; }
#math_cross_modal a{ width: 100%; color: #ffae00; font-weight: bold; font-size: 18px; margin-top: 30px; }
#math_cross_modal span{ width: 100%; color: #ffae00; font-weight: bold; font-size: 18px; margin-top: 20px; }
#math_cross_modal a, #math_cross_modal span{ font-size: 22px; }
#math_cross_modal .modal-content{ height: auto;  width: 350px; margin: 0 auto; }
#math_cross_modal .btn{ width: auto !important; }

#math_cross_modal_hint{ top: 25%; color: #000; font-weight: bold; font-size: 15px; }
#math_cross_modal_hint a{ width: 100%; color: #ffae00; font-weight: bold; font-size: 18px; margin-top: 30px; }
#math_cross_modal_hint span{ width: 100%; color: #ffae00; font-weight: bold; font-size: 18px; margin-top: 20px; }
#math_cross_modal_hint a, #math_cross_modal_hint span{ font-size: 22px; }
#math_cross_modal_hint .modal-content{ height: auto;  width: 350px; margin: 0 auto; }
#math_cross_modal_hint .btn{ width: auto !important; }

#math_cross_modal_start{ top: 25%; color: #000; font-weight: bold; font-size: 15px; }
#math_cross_modal_start a{ width: 100%; color: #ffae00; font-weight: bold; font-size: 18px; margin-top: 30px; }
#math_cross_modal_start span{ width: 100%; color: #ffae00; font-weight: bold; font-size: 18px; margin-top: 20px; }
#math_cross_modal_start a, #math_cross_modal_start span{ font-size: 22px; }
#math_cross_modal_start .modal-content{ height: auto;  width: 350px; margin: 0 auto; }
#math_cross_modal_start .btn{ width: auto !important; }

#math_cross_modal_give_up{ top: 25%; color: #000; font-weight: bold; font-size: 15px; }
#math_cross_modal_give_up a{ width: 100%; color: #ffae00; font-weight: bold; font-size: 18px; margin-top: 30px; }
#math_cross_modal_give_up span{ width: 100%; color: #ffae00; font-weight: bold; font-size: 18px; margin-top: 20px; }
#math_cross_modal_give_up a, #math_cross_modal_give_up span{ font-size: 22px; }
#math_cross_modal_give_up .modal-content{ height: auto;  width: 350px; margin: 0 auto; }
#math_cross_modal_give_up .btn{ width: auto !important; }


@media(min-width: 1025px) and (max-width: 1450px){
	.math_cross{
		width: 80% !important;
	}
}

@media(min-width: 1366px) and (max-width: 1366px){
	.math_cross{
		width: 65% !important;
	}
	#answerInput{
		width: 200px !important;
		padding: 8px !important;
		margin-bottom: 0 !important;
	}
	.math_cross .header, .crossword-grid {
		margin-bottom: 15px !important;
	}
}

@media(max-width: 580px){
	.clue-section{
		text-align: center;
		display: block;
	}
}


/* .clue-part { */
	/* padding: 8px 0; */
	/* margin: 5px 0; */
/* } */

.clue-part.current {
	/* color: #333; */
	/* font-weight: bold; */
	/* padding: 10px 0; */
	/* border-radius: 5px; */
	/* margin-top: 30px; */
	/* font-weight: 500; */
	margin: -30px 0;
}

/* .clue-part.answered { */
	/* color: #666; */
	/* text-decoration: line-through; */
	/* opacity: 0.6; */
/* } */

/* .clue-part.future { */
	/* color: #333; */
	/* opacity: 0.7; */
/* } */

#switchPartBtn {
  background-color: #9dccf3;
}

.cell-ab-label {
  position: absolute;
  bottom: 2px;
  left: 3px;
  font-size: 13px;
  color: #555;
  font-weight: bold;
}

.fraction {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-size: 22px;
    line-height: 1.1;
    vertical-align: middle;
}

.fraction .top {
	border-bottom: 2px solid #000;
    padding: 5px 4px;
    margin-bottom: 5px;
}

.fraction .bottom {
    padding: 0 4px;
}

@media(max-height: 864px){
	.cell {
		width: 40px !important;
		height: 40px !important;
		font-size: 20px !important;
	}
	.math_cross .timer-label, .math_cross .left-label {
		font-size: 15px !important;
	}
	.math_cross .timer-value{
		font-size: 20px !important;
	}
	#giveAnswerBtn{
		width: 50% !important;
	}
	.cell-number, .cell-ab-label{
		font-size: 10px !important;
	}
	.clue-header{
		font-size: 20px !important;
	}
	.clue-text {
		font-size: 14px !important;
		margin-top: -25px !important;
	}
	.clue-section{
		padding: 8px 25px !important;
		margin-top: -20px !important;
	}
	.action-btn{
		padding: 10px !important;
		font-size: 12px !important;
	}
	.math_cross .progress-container {
		width: 50px !important;
		height: 110px !important;
		margin-bottom: 70px !important;
	}
	.snail-img {
		width: 100px !important;;
	}
	.answer-input{
		font-size: 14px !important;
	}
	.top-text{
		margin-bottom: -30px !important;
		margin-right: 130px !important;
	}
	.top-text img{
		height: 55px !important;;
	}
}


.fraction-input {
    width: 100px;
    /* margin: 0 auto; */
    text-align: center;
    padding-top: 6px;
}

.fraction-input input {
    width: 100px;
    /* height: 30px; */
    /* font-size: 22px; */
    text-align: center;
    border: 1px solid #ccc;
    outline: none;
	margin: 0;
    padding: 5px;
}

.frac-line {
    width: 100px;
    border-top: 2px solid #000;
    margin:px auto;
}

.cell.active-piece {
	outline: 2px solid red;
    z-index: 2;
}

.digit-wrapper {
  display: flex;
  gap: 8px;
}

.digit-box {
  width: 40px;
  height: 45px;
  text-align: center;
  font-size: 22px;
}

.locked {
  background: #ddd;
  font-weight: bold;
  border: 1px solid #545454;
  border-radius: 2px;
}

.mc_input_div{
	width: 65%;
	margin-right: 20px;
    text-align: left;
}






@media(max-width: 768px){
	/* .math_cross_screen { */
	    /* display: unset !important; */
		/* min-height: unset !important; */
	/* } */
	.math_cross_screen .card {
		width: 100% !important;
	}
}
  .math_cross_screen, .math_cross_screen_congrats {
	display: flex;
    min-height: 100vh;
    justify-content: center;
  }
  
  .math_cross_screen .card {
    position: relative;
    width: 560px;
    height: 560px;
    background-image: url('../images/math_cross/MathCrossBase.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
  }

  /* Yellow circle overlay */
  .math_cross_screen .circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    width: 490px;
    height: 490px;
    background: #c8d422;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px 30px;
    gap: 4px;
  }

  .math_cross_screen .title {
    font-size: 60px;
    font-weight: 700;
    color: #111;
    text-align: center;
    line-height: 1.05;
    letter-spacing: -1px;
    margin-bottom: 2px;
  }

  .math_cross_screen .content-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    margin-top: 2px;
  }

  .math_cross_screen .left-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
  }

  .math_cross_screen .stopwatch-img {
    width: 90px;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.25));
  }

  .timer-text {
    font-size: 17px;
    color: #111;
    text-align: center;
    line-height: 1.4;
    font-weight: 500;
  }

  .math_cross_screen .timer-text strong {
    font-size: 17px;
    font-weight: 900;
  }

  .math_cross_screen .right-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
  }

  .math_cross_screen .ninja-img {
    width: 115px;
    filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.3));
    margin-bottom: -4px;
  }

  .math_cross_screen .points {
    font-size: 38px;
    color: #8b5cf6;
    text-align: center;
    line-height: 1;
	font-weight: bold;
  }

  .math_cross_screen .points-label {
    font-size: 17px;
    font-weight: 500;
    color: #111;
    text-align: center;
    line-height: 1.2;
  }

  .math_cross_screen .btn-ready {
    display: inline-block;
    background: #9b72e6;
    color: #fff;
    font-size: 28px;
    padding: 8px 44px;
    border-radius: 14px;
    border: 2px solid #000;
    cursor: pointer;
    box-shadow: 0 6px 0 #6b46b0, 0 8px 16px rgba(0,0,0,0.25);
    letter-spacing: 0.5px;
    transition: transform 0.1s, box-shadow 0.1s;
    margin-top: 15px;
    text-decoration: none;
	font-weight: 700;
  }

  .math_cross_screen .btn-ready:hover {
    transform: translateY(2px);
    box-shadow: 0 4px 0 #6b46b0, 0 6px 12px rgba(0,0,0,0.2);
  }

  .math_cross_screen .btn-ready:active {
    transform: translateY(5px);
    box-shadow: 0 1px 0 #6b46b0;
  }
  
  .math_cross #giveUpBtn{
	  display:none;
	  position:absolute;
	  right:10px;
	  width: 100px;
	  font-weight: 500;
      font-size: 13px;
	  border: 2px solid #000;
	  outline: none;
      border-radius: 10px;
  }
  
  
  
  
  
.math_cross_screen_congrats .card {
    position: relative;
    width: 560px;
    height: 560px;
    background-image: url('../images/math_cross/MathCrossBase.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
  }

  /* Yellow circle overlay */
.math_cross_screen_congrats .circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    width: 490px;
    height: 490px;
    background: #c8d422;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px 30px;
    gap: 4px;
  }

.math_cross_screen_congrats .title {
    /* font-size: 58px; */
    /* font-weight: 900; */
    /* color: #111; */
    /* text-align: center; */
    /* line-height: 1.05; */
    /* letter-spacing: -1px; */
    /* margin-bottom: 4px; */
    /* align-self: flex-start; */
    /* margin-left: 10px; */
	
	font-size: 60px;
    font-weight: 700;
    color: #111;
    text-align: center;
    line-height: 1.05;
    letter-spacing: -1px;
    margin-bottom: 2px;
  }

  .math_cross_screen_congrats .content-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    margin-top: 15px;
  }

  .math_cross_screen_congrats .left-side {
	display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    padding-left: 70px;
    text-align: center;
  }

  .math_cross_screen_congrats .solved-text {
    font-size: 15px;
    font-weight: 500;
    color: #111;
    line-height: 1.3;
  }

  .math_cross_screen_congrats .btn-continue {
    display: inline-block;
    background: #9b72e6;
    color: #fff;
    font-size: 24px;
    padding: 8px;
    border-radius: 14px;
    border: 2px solid #000;
    cursor: pointer;
    box-shadow: 0 6px 0 #6b46b0, 0 8px 16px rgba(0,0,0,0.25);
    letter-spacing: 0.5px;
    transition: transform 0.1s, box-shadow 0.1s;
    margin-top: 5px;
    text-decoration: none;
	font-weight: 700;
  }

  .math_cross_screen_congrats .btn-continue:hover {
    transform: translateY(2px);
    box-shadow: 0 4px 0 #6b46b0, 0 6px 12px rgba(0,0,0,0.2);
  }

  .math_cross_screen_congrats .right-side {
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 4px;
    flex: 1;
    position: relative;
	text-align: right;
  }

  .math_cross_screen_congrats .ninja-img {
    width: 165px;
    filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.3));
  }

  /* Speech bubble */
  .math_cross_screen_congrats .speech-bubble {
    position: absolute;
    top: -65px;
    right: -10px;
    background: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 18px;
    font-weight: 900;
    color: #111;
    line-height: 1.25;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }

  .math_cross_screen_congrats .speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 20px;
    border-width: 12px 10px 0;
    border-style: solid;
    border-color: #fff transparent transparent;
  }

  /* Stars / balloons decorations */
  .math_cross_screen_congrats .balloons-img {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 560px;
    pointer-events: none;
    z-index: 10;
  }  