/* General Page Layout (Shared) */
html, body {
    margin: 0;
    padding: 0;
    height: 100%; /* Full height for HTML and body */
    display: flex;
    flex-direction: column; /* Stack header, main, and footer */
    box-sizing: border-box;
}

* {
    box-sizing: border-box; /* Apply consistent box model */
}

/* General body styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f7fa;
    line-height: 1.6;
}

header {
    background-color: #222;
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

header nav a {
    color: #fff;
    margin: 0 1rem;
    text-decoration: none;
}

header nav a:hover {
    text-decoration: underline;
}

/* Shared Form Styles */
.form-container {
    background-color: #333;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgb(126, 125, 125);
    max-width: 400px;
    text-align: center;
    color: #fff;
}

.form-container h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.form-container form {
    display: flex;
    flex-direction: column;
}

.form-container form label {
    margin-bottom: 0.5rem;
    text-align: left;
    font-weight: bold;
}

.form-container form input {
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid #858282;
    border-radius: 5px;
    font-size: 1rem;
    color: #333;
    background-color: #f1f1f1;
}

.form-container form button {
    background-color: #2575fc;
    color: #fff;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-container form button:hover {
    background-color: #0056b3;
}

/* Error and Success Message Styling */
.error-message, .success-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    font-weight: bold;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
}

/* Error label styling */
label.error {
    color: #f44336;
    font-size: 0.9em;
    margin-top: 0.5rem;
}

/* Pop-up styles */
.error-popup {
    position: absolute;
    top: 101px; /* Position it above the form */
    left: 50%;
    transform: translateX(-50%); /* Center it horizontally */
    background-color: #f44336;
    color: white;
    padding: 20px;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    visibility: hidden; /* Initially hidden */
    opacity: 0;
    transition: opacity 0.5s ease-out, visibility 0s 0.5s; /* Smooth fade-out */
}

/* Pop-in animation */
@keyframes popIn {
    0% {
        transform: translateX(-50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

/* Pop-out animation */
@keyframes popOut {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(0.5);
        opacity: 0;
    }
}

/* Make the popup visible and apply the pop-in animation */
.error-popup.show {
    visibility: visible;
    animation: popIn 0.5s ease-out forwards;
}

/* Apply the pop-out animation */
.error-popup.hide {
    animation: popOut 0.5s ease-out forwards;
    visibility: hidden;
}

/* Create Account Section */
#create-account, #sign-in {
    flex: 1;
    background: linear-gradient(to bottom, #6a11cb, #2575fc); /* Matches the shared gradient */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    min-height: calc(100vh - 130px); /* Adjust based on header/footer size */
}

#create-account .form-container, #sign-in .form-container {
    background-color: #333;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    text-align: center;
    color: #fff;
}

#create-account .form-container h2, #sign-in .form-container h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

#create-account .form-container p, #sign-in .form-container p {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Match buttons and input styles */
#create-account .form-container form input,
#create-account .form-container form button,
#sign-in .form-container form input,
#sign-in .form-container form button {
    width: 100%; /* Ensure consistent width */
}

#create-account .form-container form button,
#sign-in .form-container form button {
    margin-top: 1rem;
}

/* Add spacing around purchased plan text */
#create-account #purchased-plan, #sign-in #purchased-plan {
    font-size: 1rem;
    font-style: italic;
    color: #ddd;
    margin-bottom: 1rem;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #222;
    color: #ccc;
    font-size: 0.9rem;
}

footer .footer-links {
    margin-top: 1rem;
}

footer .footer-links a {
    color: #2575fc;
    margin: 0 1rem;
    text-decoration: none;
    transition: color 0.3s;
}

footer .footer-links a:hover {
    color: #0056b3;
}
