/* GAME INTERFACE */
#game-interface {
    display: grid;
    height: 525px;
    width: 100%;
    position: relative;
}

.grid-box {
    width: 15px;
    height: 15px;
    background-color: #fff9e1;
    border: 1px solid rgb(204,204,204,0.5);
    box-sizing: border-box; /* Ensures borders don't affect size */
}

/* BUTTONS */
.button-row {
    display: flex;
    justify-content: center; /* Push groups to the edges */
    align-items: center; /* Align buttons vertically (optional) */
    position: relative;
}

.button-row-farend {
    display: flex;
    justify-content: space-between; /* Push groups to the edges */
    align-items: center; /* Align buttons vertically (optional) */
    width: 100%; /* Make sure it spans the width of the parent */
}

.left-buttons, .right-buttons {
    display: flex;
    gap: 10px;
}

#button-score {
    cursor: default; /* Keeps the cursor unchanged */
    width: 60px; 
    position: relative;
    display: flex; 
    justify-content: center; 
    align-items: center;
}

#button-gridsize {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: default;
}

#gridsize-icon {
    font-size: 18.75px; /* Adjust grid size, 50px * 1.25 is max */
    margin-bottom: 4px;
}

/* GAME ELEMENTS */
.snake-part {
    width: 15px;
    height: 15px;
    background-color: rgb(255,0,0);
    border: 1px solid #000; 
    position: absolute;
}

#apple {
    width: 15px;
    height: 15px;
    background-color: rgb(0,255,0);
    position: absolute;
}

/* POPUP EFFECT */
.popup {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 30%;
    top: 25%;
    width: 40%; /* Full width */
    height: flex; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    flex-direction: column;   /* Stack content vertically */
    justify-content: center;  /* Center content vertically */
    align-items: center;      /* Center content horizontally */
    padding: 20px;            /* Padding inside the popup */
    text-align: center;       /* Center text alignment */
}

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

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

.body-popup {
    background-color: #fff9e1;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: flex; /* Could be more or less, depending on screen size */
}

/* SLIDERS */
.slider {
    margin-top: 17px;
    height: 10px;
}

#slider-title {
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none; /* Prevent tooltip from interfering with mouse events */
    transform: translate(-50%, -150%); /* Position above the cursor */
    opacity: 0;
    transition: opacity 0.1s ease;
}

input[type="range"] {
    background: #ddd;
    border-radius: 5px;
    outline: none;
}