.main-panel {
    display: grid;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.288);
    border: 2px solid #e2e2e2;
    border-radius: 12px;
    max-width: 52rem;
    margin: 2rem auto;
    padding: 2.5rem 0 5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    animation: fadeIn 0.6s ease-in-out;
}

body.dark-mode .main-panel {
    background-color: rgba(68, 68, 68, 0.288);
    border: 2px solid #C9C9C9;
}

.main-panel h1 {
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: center;
}


body.dark-mode .main-panel h1 {
    color: #f5efef;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}




.pre-btn {
    text-decoration: none;
    display: flex;
    justify-content: flex-start;
    margin-bottom: -2.5rem;
    margin-left: 24rem;
}

.difficulty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.pre-button {
    align-items: center;
    appearance: none;
    background-color: #fcfcfd;
    border-radius: 4px;
    border-width: 0;
    box-shadow:
        rgba(45, 35, 66, 0.2) 0 2px 4px,
        rgba(45, 35, 66, 0.15) 0 7px 13px -3px,
        #d6d6e7 0 -3px 0 inset;
    box-sizing: border-box;
    color: #36395a;
    cursor: pointer;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    line-height: 1;
    list-style: none;
    overflow: hidden;
    padding-left: 16px;
    padding-right: 16px;
    position: relative;
    text-align: left;
    text-decoration: none;
    transition:
        box-shadow 0.15s,
        transform 0.15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    white-space: nowrap;
    will-change: box-shadow, transform;
    font-size: 18px;
    margin: 1rem 50rem 1rem auto;
}

.pre-button>svg {
    margin-right: 5px;
    margin-left: 5px;
    font-size: 20px;
    transition: all 0.4s ease-in;
}

.pre-button:hover>svg {
    font-size: 1.2em;
    transform: translateX(-5px);
}

.pre-button:focus {
    box-shadow:
        #d6d6e7 0 0 0 1.5px inset,
        rgba(45, 35, 66, 0.4) 0 2px 4px,
        rgba(45, 35, 66, 0.3) 0 7px 13px -3px,
        #d6d6e7 0 -3px 0 inset;
}

.pre-button:hover {
    box-shadow:
        rgba(45, 35, 66, 0.3) 0 4px 8px,
        rgba(45, 35, 66, 0.2) 0 7px 13px -3px,
        #d6d6e7 0 -3px 0 inset;
    transform: translateY(-2px);
}

.pre-button:active {
    box-shadow: #d6d6e7 0 3px 7px inset;
    transform: translateY(2px);
}

.pre-button a {
    color: #1a1a1a;
    text-decoration: none;
}


.button-name {
    align-items: center;
    appearance: none;
    background-color: #fcfcfd;
    border-radius: 4px;
    border-width: 0;
    box-shadow:
        rgba(45, 35, 66, 0.2) 0 2px 4px,
        rgba(45, 35, 66, 0.15) 0 7px 13px -3px,
        #d6d6e7 0 -3px 0 inset;
    box-sizing: border-box;
    color: #1a1a1a;
    cursor: pointer;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    line-height: 1;
    list-style: none;
    overflow: hidden;
    padding-left: 16px;
    padding-right: 16px;
    position: relative;
    text-align: left;
    text-decoration: none;
    transition:
        box-shadow 0.15s,
        transform 0.15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    white-space: nowrap;
    will-change: box-shadow, transform;
    font-size: 18px;
}

.button-name a {
    color: #1a1a1a;
    text-decoration: none;
}

.button-name:focus {
    box-shadow:
        #d6d6e7 0 0 0 1.5px inset,
        rgba(45, 35, 66, 0.4) 0 2px 4px,
        rgba(45, 35, 66, 0.3) 0 7px 13px -3px,
        #d6d6e7 0 -3px 0 inset;
}

.button-name:hover {
    box-shadow:
        rgba(45, 35, 66, 0.3) 0 4px 8px,
        rgba(45, 35, 66, 0.2) 0 7px 13px -3px,
        #d6d6e7 0 -3px 0 inset;
    transform: translateY(-2px);
}

.button-name:active {
    box-shadow: #d6d6e7 0 3px 7px inset;
    transform: translateY(2px);
}

#easy:hover {
    background-color: #b4f1a4;
}

#medium:hover {
    background: #90EA78;
}

#hard:hover {
    background-color: #f1a4a4;
}

#expert:hover {
    background: #EA7878;
}

body.dark-mode #easy:hover,
#medium:hover,
#hard:hover,
#expert:hover {
    color: #fcfcfd;
}

@media screen and (max-width: 768px) {
    .main-panel {
        width: 95%;
        padding: 0.5rem;
    }

    .main-panel h1 {
        margin-top: 1.5rem;
    }

    .button-name,
    .pre-button {
        width: 100%;
        font-size: 16px;
        padding: 0.75rem;
        margin: 1rem 0;
    }

    #easy:active {
        background-color: #b4f1a4;
    }

    #medium:active {
        background: #90EA78;
    }

    #hard:active {
        background-color: #f1a4a4;
    }

    #expert:active {
        background: #EA7878;
    }

    #easy:active,
    #medium:active,
    #hard:active,
    #expert:active {
        transform: scale(0.96);
        transition: transform 0.1s ease;
    }

    .game-buttons {
        flex-direction: column;
        gap: 1rem;
    }


    .pre-btn {
        margin: 1rem auto;
        justify-content: center;
    }

}