/* General Body Styles */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6; /* Light greyish background */
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
header {
    background-color: #4CAF50; /* Green primary color */
    color: #fff;
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

header h1 {
    margin: 0;
    font-size: 2.2em;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #c8e6c9; /* Lighter green on hover */
}

/* Main Content Area */
main {
    flex: 1; /* Allows main content to grow and push footer down */
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Section common styles */
section {
    padding: 20px 0;
    text-align: center;
}

section h2 {
    color: #3F51B5; /* Indigo secondary color */
    font-size: 1.8em;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* Form Styles */
.input-section form {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 450px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fefefe;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-group label {
    font-size: 1.1em;
    color: #555;
    flex-basis: 30%; /* Adjust label width */
    text-align: left;
    padding-right: 15px;
}

.form-group input[type="number"] {
    width: 65%; /* Adjust input width */
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1.1em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="number"]:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
    outline: none;
}

button[type="submit"] {
    background-color: #4CAF50;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

button[type="submit"]:hover {
    background-color: #43A047; /* Darker green on hover */
    transform: translateY(-2px);
}

button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Return Link (Back to Home) */
.return-link {
    background-color: #3F51B5; /* Indigo secondary color */
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.return-link:hover {
    background-color: #303F9F; /* Darker indigo on hover */
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 20px 0;
    background-color: #333;
    color: #bbb;
    font-size: 0.9em;
    margin-top: 30px;
}

/* Small error message for变卦 */
.error-message-small {
    color: #d32f2f;
    font-weight: bold;
    font-size: 0.9em;
    padding: 10px;
    background-color: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 5px;
    margin-top: 10px;
}