body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    text-align: center;
    padding: 20px;
    background-color: #007bff;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 24px;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

footer {
    background: #333;
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

.button {
    display: inline-block;
    font-size: 16px;
    color: #ffffff;
    background: #28a745;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

.button:hover {
    background: #218838;
}

.question {
    background: #ffffff;
    border: 1px solid #dddddd;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
}

.answer {
    margin-top: 10px;
}

.selected {
    border: 2px solid red;
    color: red;
    font-weight: bold;
}

#test {
    padding: 20px;
    max-width: 1024px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden; /* Ensure content does not overflow */
}

#navigation {
    padding-top: 20px;
    padding-bottom: 30px;
    text-align: center;
    display: flex;
    /* flex-wrap: wrap; */
    justify-content: center;
    align-items: center; /* Align items vertically in the center */
    gap: 10px;
    max-width: 1024px; /* Ensure it matches the max-width of #test */
    margin: 0 auto; /* Center the navigation within the main content area */
}

#questionLinks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    width: auto;
}

#question {
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    flex-direction: column; /* Ensure content stacks vertically */
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

#answer {
    display: none;
    padding: 20px;
}

#submitContainer {
    padding-top: 30px;
    padding-bottom: 20px;
    text-align: center;
}

button.nav-button {
    margin: 0px;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

button.nav-button:hover {
    background-color: #0056b3;
}

a.question-link {
    margin: 0px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    background-color: #f8f9fa;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
    flex: 0 1 auto; /* Allow the links to wrap */
}

a.question-link.current {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
}

a.question-link:hover {
    background-color: #0056b3;
    color: #fff;
}

.number-line-container {
    position: relative;
    width: 470px;
    height: 70px;
    margin-bottom: 20px;
}

.horizontal-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: black;
    top: 30px;
}

.ball-container {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ball {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.white-ball {
    background-color: white;
    border: 1px solid black;
}

.black-ball {
    background-color: black;
    border: 1px solid black;
}

.transparent-ball {
    background-color: transparent;
    border: 0;
}

.tick {
    width: 2px;
    height: 10px;
    background-color: black;
    margin-top: 5px;
}

.number {
    margin-top: 5px;
}

.answer-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
}

.answer-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
    width: 100%;
}

.position-label {
    width: 80px;
}

.color-label {
    margin-right: 0px;
}

.color-radio {
    margin-right: 20px;
}


.visual-area {
    position: relative;
    width: 300px;
    height: 300px;
    border: 1px solid black;
}

.number-element {
    position: absolute;
    cursor: pointer;
}

.grid-area {
    display: grid;
    grid-template-columns: repeat(10, 30px);
    grid-template-rows: repeat(10, 30px);
    gap: 2px;
}

.grid-cell {
    width: 30px;
    height: 30px;
    border: 1px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.grid-cell:hover {
    background-color: #e0e0e0;
}

.results-container {
    position: fixed;
    top: 35%; 
    right: 20px;
    transform: translateY(-50%);
    font-size: 200px;
    color: #007bff;
    font-weight: bold;
}