body {
    font-family: Arial, sans-serif;
    margin: 30px;
    background: #fafafa;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 0.1em;
}

h2 {
    font-size: 1.5em;
    font-weight: normal;
    color: #226644;
    margin-top: 0;
    margin-bottom: 1.2em;
}

table {
    border-collapse: collapse;
    margin-bottom: 18px;
    background: #fff;
}

th,
td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
}

th {
    background: #c8e6c9;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

input[type="number"] {
    width: 70px;
    padding: 4px;
    border: 1px solid #aaa;
    border-radius: 4px;
}

button {
    padding: 8px 16px;
    font-size: 1.05em;
    background: #339966;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background .15s;
}

button:hover {
    background: #28794d;
}

#averageResult3 {
    margin-top: 22px;
    font-size: 1.5em;
    font-weight: bold;
    min-height: 2.5em;
    text-align: center;
    transition: color 0.3s;
}

.center-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.center-container h1,
.center-container h2,
.center-container #averageResult {
    text-align: center;
}

.center-container table {
    margin: 0 auto;
}

.credit {
    margin-top: 40px;
    text-align: center;
    font-size: 1em;
    color: #555;
    opacity: 0.7;
    letter-spacing: 1px;
}

.center-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

table {
    max-width: 98vw;
    width: 400px;
    margin: 0 auto;
    font-size: 1em;
}

@media (max-width: 768px) {


    h1 {
        font-size: 1.8em;
        margin: 15px 0 5px 0;
    }

    h2 {
        font-size: 0.95em;
        margin: 0 0 15px 0;
    }

    body {
        padding: 10px;
        margin: 0;
    }

    .center-container {
        padding: 10px;
    }

    table {
        width: 95vw;
        font-size: 0.9em;
    }

    th,
    td {
        padding: 6px 4px;
        font-size: 0.85em;
    }

    input[type="number"] {
        width: 50px;
        padding: 5px;
        font-size: 0.9em;
    }

    button {
        font-size: 1em;
        padding: 8px 16px;
        margin-top: 15px;
    }


    #averageResult {
        font-size: 1.4em;
        margin-top: 15px;
    }

    #averageResult span {
        display: block;
        margin-top: 5px;
    }

    .credit {
        font-size: 0.8em;
        margin-top: 20px;
    }
}

body {
    margin: 0;
    padding: 0;
}

.result-bad {
    color: #c62828;
}

.result-mid {
    color: #f9a825;
}

.result-good {
    color: #388e3c;
}

.result-excellent {
    color: #1565c0;
}

@keyframes pop-result {
    0% {
        transform: scale(1);
    }

    60% {
        transform: scale(1.24);
    }

    100% {
        transform: scale(1);
    }
}

.result-animate {
    animation: pop-result 0.4s ease;
}

#averageResult4 {
    margin-top: 22px;
    font-size: 1.5em;
    font-weight: bold;
    min-height: 2.5em;
    text-align: center;
    transition: color 0.3s;
}