/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    overflow: hidden;               /* Prevent scrolling */
    height: 100%;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;                  /* Full viewport height */
    margin: 0;
}

/* Shared Container Styling */
.container {
    width: 100%;                    /* Full width */
    max-width: 600px;               /* Limit max width for larger screens */
    background-color: #fff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.settings-container, .login-container {
    height: 100vh;                  /* Full viewport height */
}

/* Heading */
h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #333;
}

/* Form Layout */
form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-size: 1rem;
    color: #555;
}

/* Input Fields Styling */
input[type="text"],
input[type="password"] {
    padding: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1.1rem;
    width: 100%;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #6a5acd;
    outline: none;
}

/* Button Styling */
button[type="submit"], .buttonstyle {
    padding: 1.2rem;
    font-size: 1.1rem;
    color: #fff;
    background-color: #6a5acd;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    text-decoration: none;
}

button[type="submit"]:hover, .buttonstyle:hover {
    background-color: #5a4ab0;
}

/* Back Button Styling */
button[type="button"], .buttonstyle {
    padding: 1.2rem;
    font-size: 1.1rem;
    color: #fff;
    background-color: #6a5acd;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    text-decoration: none;
}

button[type="button"]:hover, .buttonstyle:hover {
    background-color: #5a4ab0;
}

/* Error and Success Message Styling */
.error, .success {
    font-size: 0.9rem;
    margin-top: 1rem;
}

.error {
    color: red;
}

.success {
    color: green;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .container {
        padding: 2.5rem 1.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    input[type="text"],
    input[type="password"],
    button[type="submit"], .buttonstyle {
        font-size: 1.2rem;
    }
}
