body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#test-container, #result-container {
    max-width: 600px;
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1;
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #f4f4f9;
    border-top: 1px solid #ccc;
    width: 100%;
    box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.footer-left, .footer-center, .footer-right {
    flex: 1;
    text-align: center;
}

.footer-left a, .footer-right a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-left a:hover, .footer-right a:hover {
    color: #0056b3;
}

.footer-center p {
    margin: 0;
}

.section {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.question-title {
    background-color: #007bff;
    color: #ffffff;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

#question-container {
    text-align: left;
    margin-bottom: 20px;
}

#question-status {
    font-style: italic;
    color: #000;
    text-align: center;
}

#next-button, #prev-button {
    width: 48%;
    padding: 15px 0;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 1.2em;
}

#next-button span, #prev-button span {
    display: inline-block;
    transition: transform 0.3s ease;
}

#next-button:hover {
    transform: translateX(10px);
    background: linear-gradient(90deg, #00ff00 0%, #007bff 100%);
}

#prev-button:hover {
    transform: translateX(-10px);
    background: linear-gradient(90deg, #007bff 0%, #00ff00 100%);
}

#prev-button:hover span {
    transform: translateX(-5px);
}

#progress-bar {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

#progress {
    height: 10px;
    width: 0;
    background-color: #007bff;
    border-radius: 5px;
}

#summary-table {
    margin-top: 20px;
    text-align: left;
}

.result-section {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#strong-points-section {
    background-color: #d1e7dd;
}

#no-impact-points-section {
    background-color: #fff3cd;
}

#weak-points-section {
    background-color: #f8d7da;
}

.result-section h4 {
    background-color: #007bff;
    color: #ffffff;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    margin: -10px -10px 10px -10px;
    text-align: center;
}

.result-section div {
    margin-bottom: 10px;
}

#restart-button {
    padding: 20px 40px;
    background-color: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#restart-button:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

#restart-warning {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
}

#rapid-mode {
    margin-top: 40px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.rapid-button {
    padding: 15px 30px;
    margin: 10px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#enable-rapid {
    background-color: #28a745;
    color: #ffffff;
}

#enable-rapid:hover {
    background-color: #218838;
    transform: scale(1.05);
}

#disable-rapid {
    background-color: #dc3545;
    color: #ffffff;
}

#disable-rapid:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

.rapid-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #000;
    background-color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    background: none;
    background-size: 200% 100%;
    animation: none;
}

.rapid-status.active {
    background: linear-gradient(90deg, #ffcccb 25%, #ccffcc 50%, #ffffcc 75%);
    background-size: 200% 100%;
    animation: loading-animation 3s linear infinite;
}

@keyframes loading-animation {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

#restart-explanation {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .navigation-buttons {
        flex-direction: column;
    }

    #next-button, #prev-button, .rapid-button, #restart-button {
        width: 100%;
        margin-bottom: 10px;
        padding: 15px 0;
        font-size: 18px;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }

    .footer-left, .footer-center, .footer-right {
        margin-bottom: 10px;
    }

    #test-container, #result-container {
        margin: 10px;
        padding: 10px;
    }

    .section {
        margin-bottom: 10px;
        padding: 5px;
    }

    .question-title {
        font-size: 1.2em;
    }

    .rapid-status {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .question-title {
        font-size: 1em;
    }

    .rapid-button, #restart-button {
        padding: 20px 40px;
        font-size: 20px;
    }

    .rapid-status {
        font-size: 12px;
    }

    footer {
        padding: 10px;
    }

    .footer-left, .footer-center, .footer-right {
        margin-bottom: 5px;
    }
}