body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    margin-top: 20px;
}

h1, h2 {
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="date"],
input[type="number"],
select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

button[type="submit"]:hover {
    background-color: #555;
}

.results {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.results p {
    margin: 10px 0;
}

.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.flash-message.error {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    color: #b71c1c;
}

.percentile-gauge {
    position: relative;
    width: 100%;
    height: 50px;
    margin: 20px 0;
}

.gauge-background {
    display: flex;
    height: 100%;
    border: 1px solid #ccc;
    border-radius: 25px;
    overflow: hidden;
}

.zone {
    height: 100%;
}

.red { width: 5%; background-color: #ff6b6b; }
.yellow { width: 10%; background-color: #feca57; }
.green { width: 65%; background-color: #48dbfb; }
.white { width: 20%; background-color: #ffffff; }

.gauge-needle {
    position: absolute;
    top: -5px;
    width: 2px;
    height: 60px;
    background-color: #000;
    transform: translateX(-50%);
}

.gauge-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
}

.button-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.button {
    flex: 1;
    margin: 0 5px;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #e0e0e0;
}

.copy-button {
    background-color: #4CAF50;
    color: white;
}

.copy-button:hover {
    background-color: #45a049;
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.button-group input[type="radio"] {
    display: none;
}

.button-group input[type="radio"]:checked + label {
    background-color: #333;
    color: white;
}

.example-section {
    background-color: #e6f7ff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    border-left: 4px solid #1890ff;
}

.example-section .button-group label {
    background-color: #f0f8ff;
}

.example-section .button-group input[type="radio"]:checked + label {
    background-color: #1890ff;
    color: white;
}

.example-section-label {
    font-weight: bold;
    color: #1890ff;
    margin-bottom: 5px;
}

.correct-answer {
    background-color: #4CAF50 !important;
    color: white !important;
}

@media (max-width: 600px) {
    .container {
        width: 95%;
    }

    .percentile-gauge {
        height: 30px;
    }

    .gauge-needle {
        height: 40px;
    }

    .button-container {
        flex-direction: column;
    }

    .button {
        margin: 5px 0;
    }

    .button-group {
        flex-wrap: wrap;
    }

    .button-group label {
        flex-basis: 48%;
        margin: 1%;
    }
}