/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f7f9fc;
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background-color: #5c6bc0;
    color: #fff;
    padding: 20px;
    text-align: center;
}

.container {
    padding: 0; /* Removed padding to allow full height */
    margin: 0; /* Removed margin */
    min-height: 100vh; /* Full viewport height */
    display: flex; /* Flexbox for centering */
    align-items: center; /* Vertical centering */
    justify-content: center; /* Horizontal centering */
    flex-direction: column; /* Stack children vertically */
}

.centered-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Full width within container */
    /* Slightly shift up */
    margin-top: -50px; /* Adjust as needed */
}

/* Login Form Styling */
#login-form {
    background: linear-gradient(135deg, #ffffff, #f0f4f8);
    padding: 40px; /* Increased padding */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px; /* Increased max-width */
    transition: box-shadow 0.3s ease;
}

#login-form:hover {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#login-form h2 {
    margin-bottom: 25px; /* Increased margin */
    color: #5c6bc0;
    text-align: center;
    font-size: 26px; /* Increased font size */
}

#login-form label {
    margin-top: 12px; /* Increased margin */
    font-weight: bold;
    font-size: 16px; /* Increased font size */
}

#login-form input[type="text"],
#login-form input[type="password"] {
    width: 100%;
    padding: 12px; /* Increased padding */
    margin-top: 6px; /* Increased margin */
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px; /* Increased font size */
    transition: border-color 0.3s;
}

#login-form input[type="text"]:focus,
#login-form input[type="password"]:focus {
    border-color: #5c6bc0;
    outline: none;
}

#login-form button {
    width: 100%;
    padding: 12px; /* Increased padding */
    margin-top: 25px; /* Increased margin */
    background-color: #5c6bc0;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px; /* Increased font size */
    font-weight: bold;
    transition: background-color 0.3s;
}

#login-form button:hover {
    background-color: #3f51b5;
}

.error-message {
    margin-top: 12px; /* Increased margin */
    color: red;
    font-size: 1em; /* Increased font size */
    text-align: center;
}

/* Questionnaire Generation Page Styling */
#main-content h2 {
    color: #5c6bc0;
    font-size: 26px; /* Increased font size */
    margin-bottom: 20px; /* Increased margin */
}

#main-content button {
    background-color: #5c6bc0;
    color: #fff;
    border: none;
    padding: 12px 18px; /* Increased padding */
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 18px; /* Increased font size */
    font-weight: bold;
}

#main-content button:hover {
    background-color: #3f51b5;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px; /* Increased margin */
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px; /* Increased padding */
    text-align: left;
    font-size: 16px; /* Increased font size */
}

textarea {
    width: 100%;
    padding: 10px; /* Increased padding */
    font-family: monospace;
    margin-top: 6px; /* Increased margin */
    font-size: 16px; /* Increased font size */
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

textarea:focus {
    border-color: #5c6bc0;
    outline: none;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 25px; /* Increased padding */
    width: 80%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 16px; /* Increased font size */
}

.modal-actions {
    margin-top: 25px; /* Increased margin */
    text-align: right;
}

label {
    display: block;
    margin-top: 12px; /* Increased margin */
    font-size: 16px; /* Increased font size */
}

input[type="text"] {
    width: 100%;
    padding: 10px; /* Increased padding */
    font-size: 16px; /* Increased font size */
}

#error-message, .error-message {
    color: red;
    font-size: 1em; /* Increased font size */
}

#loader-modal .modal-content {
    text-align: center;
    font-size: 18px; /* Increased font size */
}

#generated-questionnaire-content {
    padding: 15px; /* Increased padding */
    background-color: #fff;
    font-size: 16px; /* Increased font size */
}

/* Responsive Adjustments */
@media (max-width: 500px) {
    #login-form {
        padding: 25px; /* Adjusted padding for smaller screens */
        margin: 10px;
    }

    .modal-content {
        width: 95%;
        padding: 20px; /* Adjusted padding for smaller screens */
    }
}

/* Optional Enhancements */

/* Smooth Transitions for Input Fields */
input[type="text"],
input[type="password"],
textarea {
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: #5c6bc0;
    outline: none;
}

/* Button Transitions */
button {
    transition: background-color 0.3s;
}

/* Subtle Background for Login Form */
#login-form {
    background: linear-gradient(135deg, #ffffff, #f0f4f8);
}

/* Rounded Corners for Inputs and Buttons */
#login-form input[type="text"],
#login-form input[type="password"],
#login-form button {
    border-radius: 4px;
}

/* Typography Enhancements */
h2 {
    font-size: 26px; /* Increased font size globally for h2 */
    margin-bottom: 20px; /* Increased margin */
}

label {
    font-size: 16px; /* Increased font size */
}

input[type="text"],
input[type="password"],
textarea {
    font-size: 16px; /* Increased font size */
}

button {
    font-size: 18px; /* Increased font size */
    font-weight: bold;
}

.toggle-container {     
    margin: 20px 0; 
} 

.toggle-label {    
    position: relative;     
    display: inline-flex;     
    align-items: center;     
    cursor: pointer; 
} 

.toggle-label input[type="checkbox"] {     
    position: absolute;     
    opacity: 0;     
    cursor: pointer;     
    height: 0;     
    width: 0; 
} 

.toggle-label input[type="checkbox"] + .toggle-text:before {     
    content: '';     
    position: absolute;     
    left: 0;     
    top: 50%;     
    transform: translateY(-50%);     
    display: inline-block;     
    width: 50px;     
    height: 24px;     
    background: #c6c6c6;     
    border-radius: 20px;     
    transition: 0.3s;     
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); 
} 

.toggle-label input[type="checkbox"] + .toggle-text:after {     
    content: '';     
    position: absolute;     
    left: 2px;     
    top: 50%;     
    transform: translateY(-50%);     
    width: 20px;     
    height: 20px;     
    background: #fff;     
    border-radius: 50%;     
    transition: 0.3s;     
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); 
} 

.toggle-label input:checked[type="checkbox"] + .toggle-text:before {     
    background: #03a9f4; 
} 

.toggle-label input:checked[type="checkbox"] + .toggle-text:after {     
    left: 28px; 
} 

.toggle-text {     
    font-size: 16px;     
    color: #333;     
    position: relative;     
    padding-left: 60px;     
    margin: 0; 
}
