/* Basic Reset & Defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333;
    padding: 20px;
}

/* Container */
.container {
    max-width: 600px;
    margin: 30px auto;
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 700;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    font-weight: 500;
}

/* Form Styling */
#attendance-form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Spacing between input groups */
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.input-group input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%; /* Make input take full width of its container */
    appearance: textfield; /* Remove spinner buttons in some browsers */
    -moz-appearance: textfield;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.input-group .optional-feature label::after {
    content: " (for projection)";
    font-size: 0.8em;
    color: #777;
}

/* Error Messages */
.error-message {
    color: #e74c3c;
    font-size: 0.85em;
    margin-top: 4px;
    min-height: 1.2em; /* Reserve space even when empty */
    display: block; /* Ensure it takes space */
}

input.invalid {
    border-color: #e74c3c;
}


/* Button Styling */
.button-group {
    display: flex;
    gap: 15px; /* Space between buttons */
    margin-top: 10px;
}

.button-group button {
    flex-grow: 1; /* Make buttons share width */
    padding: 12px 15px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#calculate-btn {
    background-color: #3498db;
    color: white;
}

#calculate-btn:hover {
    background-color: #2980b9;
}

#reset-btn {
    background-color: #e0e0e0;
    color: #333;
}

#reset-btn:hover {
    background-color: #bdbdbd;
}

.button-group button:active {
     transform: scale(0.98);
}


/* Results Area */
.results-area {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
}

.results-area p {
    margin-bottom: 10px;
    font-size: 1rem;
}

.results-area strong {
    font-weight: 700;
    color: #2c3e50;
}

/* Status Styling */
.status-met {
    color: #2ecc71; /* Green */
    font-weight: 500;
}

.status-below {
    color: #e74c3c; /* Red */
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        margin: 15px;
        padding: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .button-group {
        flex-direction: column; /* Stack buttons vertically */
    }
}

@media (max-width: 400px) {
    body {
        padding: 10px;
    }
    .container {
        margin: 10px;
        padding: 15px;
    }
    h1 {
        font-size: 1.5rem;
    }
    .input-group input[type="number"] {
        font-size: 0.95rem;
    }
    .button-group button {
        font-size: 0.95rem;
        padding: 10px 12px;
    }
     .results-area p {
        font-size: 0.95rem;
    }
}