/* Global styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    box-sizing: border-box;
}

/* Set box-sizing for all elements */
* {
    box-sizing: inherit;
}

/* Header styles */
#header {
    padding: 20px;
    text-align: right;
    border-bottom: 1px solid silver;
    background-color: #ffffff;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: flex-end;
}
#header a {
    margin-left: 10px;
    margin-right: 10px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 4px;
}
#header a.active {
    background-color: #007bff;
    color: #ffffff;
}

/* Form container styles */
#form {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 600px;
}

/* Headings */
h1, h2 {
    text-align: left;
    color: #333;
    margin: 0;
}

h1.encrypt {
    color: #28a745;
}

h1.decrypt {
    color: #dc3545;
}

/* Form label styles */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

/* Input field styles */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Button styles */
button {
    width: 100%;
    padding: 10px;
    background-color: #28a745;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
button:hover {
    background-color: #218838;
}

/* Paragraph styles */
p {
    word-wrap: break-word;
    color: #333;
    display: block;
}

/* Copy button styles */
.copy-button {
    background-color: #007bff;
    color: #ffffff;
}
.copy-button:hover {
    background-color: #0056b3;
}

/* Output container styles */
.output-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 20px;
}

/* Hide certain elements initially */
#decrypted-password,
#decrypted-password-show,
#generated-link {
    display: none;
}

/* Additional form styling */
form {
    margin-top: 20px;
}

/* Copy alert styles with transitions */
.copy-alert {
    display: none;
    position: fixed;
    bottom: 40px;
    left: 40px;
    right: 40px;
    padding: 10px;
    background-color: #ffb800;
    color: black;
    border-radius: 4px;
    transition: opacity 2s ease-in-out;
}
.copy-alert.show {
    display: block;
    opacity: 1;
}
.copy-alert.hide {
    opacity: 0;
}

/* Specific styles for encryption and decryption modes */
.encrypt-mode {
    background-color: #e8f5e9;
}
.decrypt-mode {
    background-color: #f8d7da;
}