h1{
    text-align: center;
    font-size: 3em;
    margin: 20px;
    padding: 0;
}
h3{
    text-align: center;
    font-size: 1em;
    margin: 20px;
    padding: 0;
}

.intro{
    background-color: #393838;
    color: white;
    padding: 20px;
}
.intro p{
    margin: 20px;
    padding: 10px;
    border-radius: 5px;
}
.intro a{
    text-decoration: none;
    background-color: #464545;
    color: white;
    padding: 10px;
    border-radius: 10px;
    margin: 30px;
}
.intro a:hover{
    background-color: #8a8787;
    transform: translateY(-2px);
}

.difficulty-pane{
    background-color: rgb(202, 218, 232);
    display: flex;
    justify-content: center;
    padding: 40px;
}
.erfidleikaButtons{
    display: flex;
    flex-direction: row;
    padding: 10px;
}
.erfidleikaButtons a{
    text-decoration: none;
    color: white;
    padding: 10px;
    border-radius: 10px;
    margin: 20px;
    text-align: center;
    width: 60px;
}
.erfidleikaButtons a:hover{
    transform: translateY(-2px);
}
#easyButton{
    background-color: #4CAF50;
}
#mediumButton{
    background-color: #d3b442;
}
#hardButton{
    background-color: #a51f07;
}


footer {
    background-color: #393838;
    color: white;
    text-align: center;
    padding: 40px;
}
footer a{
    background-color: #616060;
    text-decoration: none;
    color: white;
    padding: 10px;
    border-radius: 10px;
    margin: 30px;
}
footer a:hover{
    background-color: #8a8787;
    transform: translateY(-2px);
}
footer li{
    list-style-type: none;
    margin: 10px;
}

.correct-answer {
    color: green;
    background-color: lightgreen;
}
#gameBoard {
    width: fit-content;
    margin: auto;
}


.incorrect {
    background-color: pink;
    border: 2px solid red;
}


.correct {
    background-color: lightgreen; 
    border: 2px solid green;
}
.board-grid {
    display: grid;
    grid-template-columns: repeat(9, 50px);  
    grid-template-rows: repeat(9, 50px);     
    justify-content: center;                
    margin: 20px auto;   
    border: 4px solid black;              
}

.board-grid input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    border: 1px solid #000;                
    box-sizing: border-box;
}



.board-grid input:nth-child(3n+1) {
    border-left: 3px solid black;           
}

.board-grid input:nth-child(3n) {
    border-right: 3px solid black;           
}

.board-grid input:nth-child(-n+9) {
    border-top: 3px solid black;             
}
.board-grid input:nth-child(n+28):nth-child(-n+36) {
    border-top: 3px solid black;
}
.board-grid input:nth-child(n+55):nth-child(-n+63) {
    border-top: 3px solid black;
}


.dropdown {
    display:flex;
    justify-content: center;
    margin-top: 20px;
  
   
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.dropdown-content a:hover {
    background-color: #ddd;
}
.dropdown:hover .dropdown-content {
    display: block;
}


.correct {
    background-color: lightgreen;           
    border: 2px solid green;
}

.incorrect {
    background-color: pink;                 
    border: 2px solid red;
}

.highlight {
    background-color: lightblue;          
}
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    text-align: center;
}

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

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

#errorCounter {
    text-align: center;
    font-size: 18px;
    margin-top: 10px;
    padding: 10px;
}

.board-grid input:disabled {
    background-color: #f0f0f0;
    color: #333;
    font-weight: bold;
}

.board-grid input:focus {
    background-color: #e6f2ff;
    outline: none;
    box-shadow: none;
}

.board-grid input.correct:focus {
    background-color: lightgreen;
}

.board-grid input.incorrect:focus {
    background-color: pink;
}

.board-grid input.highlight:focus {
    background-color: #99ccff; 
}

@media (max-width: 500px) {
    #gameBoard {
        width: 75%;
        margin: auto;
    }
    
    .board-grid {
        width: 90%;
        grid-template-columns: repeat(9, 8vw); 
        grid-template-rows: repeat(9, 8vw);
    }
    .board-grid input {
        width: 100%;
        height: 100%;
        text-align: center;
        font-size: 10px;
        border: 1px solid #000;                
        box-sizing: border-box;
    }
    button {
        padding: 8px 15px;
        font-size: 5vw;
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
        font-size: 5vw;
    }

    #errorCounter {
        font-size: 5vw;
    }
    .erfidleikaButtons{
        flex-direction: column;
        flex-wrap: wrap;
    }
}