@tailwind base;
@tailwind components;
@tailwind utilities;

.menu-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

#sudoku-container {
    text-align: center;
    padding-bottom: 10px; /* Added bottom padding to prevent overlap */
}

.container {
    max-width: 800px;
}

#sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-gap: 0px;
    width: 98%;
    aspect-ratio: 1 / 1;
    margin: auto auto;    
}

.sudoku-grid-dummy {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 0px;        
    max-width: 4rem;
    aspect-ratio: 1 / 1;
    margin: auto auto;    
}

.sudoku-grid-dummy-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 0px;
    max-width: 16rem;
    width: 75%;
    aspect-ratio: 1 / 1;
    margin: auto auto;    
}

.sudoku-cell {
    border: 1px solid #000;
    text-align: center;
    font-size: 1rem; /* Adjust font size as necessary */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 10vw; /* Adjust for vertical alignment */
    font-family: monospace;
    cursor: pointer;
    position: relative;
}

.notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    line-height: min(3vw, 1px);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.invisible {
    visibility: hidden;
}

.sudoku-cell-note {
    display: flex;
    align-items: center;
    justify-content: center;
    color: gray;
    font-family: monospace;
    /* font-size: 2.5vw; */
    font-size: min(3vw, 22px);
}

.sudoku-cell-value {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;    
    font-size: min(6vw, 46px);
    z-index: 2;
}

.sudoku-cell-value-dummy {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;    
    font-size: min(5vw, 40px);
    z-index: 2;
}

#rules-drawer .sudoku-cell-value-dummy {
    font-size: 1.5rem;
}

#timer {
    font-family: monospace;
    font-size: min(3vw, 22px);
}

.best-time {
    font-family: monospace;
    font-size: min(3vw, 22px);
}

.selected {
    background-color: #e7f1ff;
    color: #0056b3;
}

:disabled {    
    background-color:#ffffffc3;
    opacity: 50%;
}

:disabled:hover {
    background-color: white;
}

.incorrect {
    color: #2bbe4b !important;
    /* background-color: #f57878e4 !important; */
}

.group-1 {
    background-color: #ffffff;
    opacity: 1;
    background-image:  repeating-linear-gradient(45deg, #d7d9fd 25%, transparent 25%, transparent 75%, #d7d9fd 75%, #d7d9fd), repeating-linear-gradient(45deg, #d7d9fd 25%, #ffffff 25%, #ffffff 75%, #d7d9fd 75%, #d7d9fd);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
    /* background-color:#007bffb6 !important; */
 }
 .group-2 {
    background-color: #ffffff;
    opacity: 1;
    /* background: repeating-linear-gradient( -45deg, #b7bdff, #b7bdff 2px, #ffffff 2px, #ffffff 10px); */
    background: repeating-linear-gradient(-45deg, #b7bdff, #b7bdff 1px, #ffffff 1px, #ffffff 5px);

 }
 .group-3 {
    background-color:#b7bdff !important;
    opacity: 1;
 }

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#numbers-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
}

#number-picker {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.sudoku-cell.border-top { border-top: 3px solid #000; }
.sudoku-cell.border-right { border-right: 3px solid #000; }
.sudoku-cell.border-bottom { border-bottom: 3px solid #000; }
.sudoku-cell.border-left { border-left: 3px solid #000; }

.highlight {
    background-color: #ffffe0;
}

.highlight-selected {
    background-color: #D3D3D3;
    caret-color: transparent;
}

.highlight-selected-secondary {
    background-color: #a9e7ff;
    caret-color: transparent;
}

.sudoku-cell.selected {
    cursor: default;
}

/* Responsive adjustments */


@keyframes blink {
    0%, 100% { background-color: #ffffff; }
    50% { background-color: #ffcc00; }
}

.cell-blink {
    animation: blink 1s linear infinite;
}

@keyframes explode {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cell-explode {
    animation: explode 0.5s ease-in-out forwards;
}

