/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'JetBrains Mono', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Main Container */
.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px; /* Max width for larger screens */
    text-align: center;
}

/* Header */
h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

/* Form Elements */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

legend {
    padding: 0 10px;
    font-weight: bold;
    color: #34495e;
}

fieldset p {
    font-family: 'Inter', sans-serif;
    font-weight: 700; /* Bold */
    text-align: left;
    margin-bottom: 10px; /* Add some space below the question text */
}

fieldset p em { /* Style for the example text within questions */
    font-weight: 400; /* Normal weight for emphasis */
    font-style: italic;
    display: block; /* Make examples appear on new lines */
    margin-top: 5px;
    color: #555; /* Slightly lighter color for examples */
}
label {
    display: block; /* Will be changed for radio button labels */
    margin-bottom: 5px;
    font-weight: 500;
    text-align: left;
}

/* Styling for radio button labels to look like buttons */
fieldset label input[type="radio"] {
    opacity: 0; /* Hide the actual radio button */
    position: fixed;
    width: 0;
}

fieldset label {
    display: inline-block; /* Allow labels to sit next to each other if needed, and accept padding/margin */
    background-color: #eee;
    padding: 10px 15px;
    font-family: 'Inter', sans-serif; /* Using Inter as requested for questions */
    font-size: 0.9em;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-right: 5px; /* Space between buttons */
    margin-bottom: 10px; /* Space below buttons */
    text-align: center;
}

fieldset label:hover {
    background-color: #000;
    color: #fff;
    transform: scale(1.05); /* Pop effect */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

fieldset label input[type="radio"]:checked + span {
    
}

fieldset input[type="radio"]:checked + label, /* This won't work as label is not a sibling */
fieldset label:has(input[type="radio"]:checked) /* More modern approach, but might need to adjust structure or use JS if not supported widely */
{
    background-color: #000;
    color: #fff;
    border-color: #000;
}



fieldset label:has(input[type="radio"]:checked) { /* Corrected selector for modern browsers */
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}


input[type="text"],
input[type="number"],
input[type="email"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'JetBrains Mono', sans-serif;
    font-size: 1em;
}

/* Keep checkbox styling separate if needed, or apply similar button styling */
input[type="checkbox"] {
    margin-right: 8px; /* Default, if not styled as a button */
}

/* Button Styling (for the main calculate button) */
.btn {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-family: 'JetBrains Mono', sans-serif;
    transition: background-color 0.3s ease;
    align-self: center; /* Center button in flex container */
}

.btn:hover {
    background-color: #2980b9;
}

.btn:active {
    background-color: #2471a3;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-icon {
    padding: 10px 12px;
    font-size: 1.2em;
    line-height: 1;
}

/* Result Container */
#result-container {
    margin-top: 25px;
    padding: 15px;
    background-color: #eafaf1;
    border: 1px solid #7dcea0;
    border-radius: 4px;
    display: none; /* Hidden by default */
}

#result-container h2 {
    margin-bottom: 10px;
    color: #1e8449;
    font-size: 1.2em;
}

#score {
    font-size: 2em;
    font-weight: bold;
    color: #1abc9c;
}

/* Responsive Adjustments - Mobile First is inherent in the above styles */

/* Larger screens (e.g., tablets and desktops) */
@media (min-width: 768px) {
    h1 {
        font-size: 2.2em;
    }

    .container {
        padding: 30px;
    }

    form {
        gap: 20px;
    }

    .btn {
        padding: 15px 25px;
        font-size: 1.2em;
    }

    #result-container {
        padding: 20px;
    }

    #result-container h2 {
        font-size: 1.4em;
    }

    #score {
        font-size: 2.5em;
    }
}
/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 400px;
    border-radius: 8px;
    text-align: left;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.modal-content input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Inter', sans-serif; /* Consistent font */
}

.modal-buttons {
    text-align: right;
}

.modal-buttons .btn {
    margin-left: 10px;
}

.btn-secondary { /* For cancel button or less prominent actions */
    background-color: #7f8c8d; /* Asbestos */
}

.btn-secondary:hover {
    background-color: #95a5a6; /* Clouds */
}
/* Footer Styles */
footer {
    margin-top: 40px;
    padding: 20px;
    background-color: #333;
    color: #f4f4f4;
    text-align: center;
    font-size: 0.8em;
    width: 100%; /* Make footer span full width */
    max-width: 100%; /* Override container max-width for footer */
    border-bottom-left-radius: 0; /* Ensure footer is rectangular if container has radius */
    border-bottom-right-radius: 0;
}

footer p {
    margin-bottom: 10px;
    line-height: 1.4;
}

footer a {
    color: #76c7c0; /* A light teal for links */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}