body {
	background-color: #f8f9fa;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    user-select: none;
    overflow: hidden;
}
.noPadding
{
	padding:0px !important;
}
#playbutton,#rulesbutton
{
    margin-top: 30vh;
}
#rulespage
{
     margin-top: 5vh;
    font-size: 20px;
}
.sudoku-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
	gap: 2px;
	margin: 0 auto;
	width: 90vw;
	max-width: 500px;
	border: 3.5px solid black;
	/* margin-top: 6vh; */
	aspect-ratio: 1 / 1; 
}
.sudoku-cell,
.sudoku-4X4cell,
.sudoku-6X6cell {
	width: 100%;
	aspect-ratio: 1 / 1;
	text-align: center;
	font-size: 4vw;
	min-block-size: 16px;
	border: 1px solid #ccc;
	background: white;
	outline: none;
	transition: all 0.2s;
}
.sudoku-4X4cell { font-size: clamp(20px, 5vw, 32px); }
.sudoku-6X6cell { font-size: clamp(18px, 4vw, 30px); }
.sudoku-cell    { font-size: clamp(16px, 3.5vw, 28px); }
.numpad-container {
	width: 90vw;
	/* max-width: 800px; */
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}
.sudoku-cell:focus {
	background: #f1f1f1;
}
.wrong {
	background: #f8d7da !important; 
}
.correct {
	background: #d4edda !important; 
}
.hint{
	background: rgb(240, 240, 147);
}
.btn-container {
	text-align: center;
	margin-top: 20px;
}
.solved {
	animation: celebration 1s ease-in-out;
	background-color: #28a745;
	color: white;
}
@keyframes celebration {
	0% { transform: scale(1); }
	50% { transform: scale(1.2); }
	100% { transform: scale(1); }
}
.focused-border {
    border: 3px solid rgb(247, 176, 46) !important;
  }
.sudoku-container[data-size="9"] .thick-right {
    border-right: 3.5px solid black;
}
.sudoku-container[data-size="9"] .thick-bottom {
    border-bottom: 3.5px solid black;
}
.sudoku-container[data-size="4"] .thick-right {
    border-right: 3.5px solid black;
}
.sudoku-container[data-size="4"] .thick-bottom {
    border-bottom: 3.5px solid black;
}
.sudoku-container[data-size="6"] .thick-right {
    border-right: 3.5px solid black;
}
.sudoku-container[data-size="6"] .thick-bottom {
    border-bottom: 3.5px solid black;
}
.shake {
    animation: shake 0.3s;
	color: red;
}
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}
#sudoku {
    gap: 0; 
}
.numpad-container {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    background: #f4f4f4;
    border: 2px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    transition: all 0.3s ease;
}
.numpad-container button {
    width: 60px;
    height: 60px;
    font-size: 24px;
    border: none;
    border-radius: 8px;
    background: #e0e0e0;
    color: #333;
    cursor: pointer;
}

.numpad-container button:hover {
    background: #d1d1d1;
}
.sudoku-container {
    flex: 1;  /* Sudoku takes more space */
}
.sudoku-row {
    display: flex;            
    flex-direction: column;   /* Stack vertically */
    align-items: stretch; 
    max-width: 1100px;
    margin: 0 auto;  
    flex-wrap: nowrap;  /* Keep in one row */
}
.numpad-container {
    flex: 0.4;  
    min-width: 48%;
}
@media (max-width: 768px) {
    .sudoku-row {
        display: flex;            
        flex-direction: column;   /* Stack vertically */
        align-items: stretch;     /* Stretch to avoid any space */
    }
}
@media (min-width: 769px) {
    .cls {
        margin-left: 12.5vw;
    }
}
@media (max-width: 698px) {
    .sudoku-container {
        margin-top: 3vh;
    }
}
.blink-fade {
    animation: blinkFade 1.2s infinite;
  }
  
  @keyframes blinkFade {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0;
    }
  }
  .cell {
    width: 40px;
    height: 40px;
    text-align: center;
    vertical-align: middle;
    line-height: 40px;
    border: 1px solid #ccc;
    font-size: 20px;
    cursor: pointer;
  }
  .homelogodivcls
  {
    position: absolute;
    z-index: 1;
  }
  .highlight-row,
.highlight-col {
    background-color: #bcddee; /* light blue highlight */
}
#endmessage
{
    margin-top: 10vh;
    font-size: 60px;
}
    @keyframes fadeInScale {
        0% {
            opacity: 0;
            transform: scale(0.85);
        }
        100% {
            opacity: 1;
            transform: scale(1);
        }
    }
    .modal {
        display: none;
        position: fixed;
        z-index: 999;
        padding-top: 100px;
        left: 0; top: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.7);
        backdrop-filter: blur(3px);
    }
    .modal-content {
        background: linear-gradient(to bottom right, #ffffff, #f0f0f0);
        margin: auto;
        padding: 25px 35px;
        border-radius: 16px;
        width: 60%;
        max-width: 600px;
        font-size: 23px;
        font-weight: bold;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
        position: relative;
        animation: fadeInScale 0.4s ease-out;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    .modal-content h2 {
        margin-top: 0;
        font-size: 1.8rem;
        color: #333;
    }
    .modal-content ul {
        padding-left: 20px;
        margin: 10px 0 0;
    }
    .modal-content li {
        margin: 10px 0;
        font-size: 1rem;
        color: #444;
    }
    .close {
        color: #999;
        font-size: 30px;
        font-weight: bold;
        cursor: pointer;
        position: absolute;
        top: 10px;
        right: 20px;
        transition: color 0.2s ease;
    }
    .close:hover {
        color: #000;
    }
    #rulesModal.show {
        display: block;
    }
      @keyframes zoomOutDown {
        0% {
          transform: scale(1) translateY(0);
          opacity: 1;
        }
        100% {
          transform: scale(0.5) translateY(2000px);
          opacity: 0;
        }
      }
      .image {
        animation: zoomOutDown 2s ease-in-out forwards;
      }