body {
    font-family: Arial, sans-serif;
    background-color: #333;
    color: #f4f4f4;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 24px 24px 0 24px; /* Top margin now matches side margins */
    padding: 12px 24px;
    background-color: #3a3a3a;
    border-radius: 10px;
    border: 1px solid #555;
    gap: 12px;
    box-sizing: border-box;
}

header {
    text-align: center;
    padding: 24px 0 12px 0;
}

main {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
    background-color: #444;
    border-radius: 12px;
    border: 1px solid #555;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18);
    align-items: center;
    text-align: center;
}

h1 { font-size: 2.5rem; margin-bottom: 0.25em; letter-spacing: 1px; }
h2 { font-size: 1.5rem; margin-bottom: 0.5em; font-weight: 600; width: 100%; }
p { margin-top: 0; margin-bottom: 1em; color: #b3c6ff; }
a { color: #60a5fa; text-decoration: none; transition: color 0.2s; }
a:hover, a:focus { color: #93c5fd; text-decoration: underline; }

.button {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    transition: background-color 0.5s ease;
    font-size: 1.1rem;
}
.button:hover, .button:focus { background-color: #60a5fa; outline: none; }
.button.action { background-color: #2563eb; color: #fff; font-weight: bold; }
.button.action:hover, .button.action:focus { background-color: #60a5fa; }

#navbar .button { width: auto; padding: 8px 16px; font-size: 1rem; }
#navbar .button.secondary {
    background-color: transparent;
    border: 1px solid #60a5fa;
    color: #60a5fa;
    font-weight: normal;
}
#navbar .button.secondary:hover { background-color: rgba(96, 165, 250, 0.1); color: #93c5fd; }
#navbar .button.logout { background-color: #b91c1c; border: 1px solid #b91c1c; color: white; }
#navbar .button.logout:hover { background-color: #dc2626; border-color: #dc2626; }

input[type="email"],
input[type="password"],
input[type="text"] {
    padding: 12px;
    border-radius: 5px;
    border: none;
    font-size: 1rem;
    background: #333;
    color: #f4f4f4;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.2s;
}
input:focus { background: #222; outline: 2px solid #2563eb; }

form { width: 100%; }

footer {
    text-align: center;
    font-size: 0.95rem;
    color: #b3c6ff;
    border-top: 1px solid #444;
    margin-top: 24px;
    padding: 24px 0 12px 0;
}

.error-message {
    background: #2e1a1a;
    color: #ffb3b3;
    border: 1px solid #b91c1c;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 1rem;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px);}
    to { opacity: 1; transform: translateY(0);}
}

.vault-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #555;
}
.vault-header h2 { margin: 0; }

#vault-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-bottom: 24px;
}

.vault-item {
    background-color: #3a3a3a;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.4s;
}
.vault-item-info { display: flex; flex-direction: column; }
.vault-item-name { font-weight: bold; font-size: 1.1rem; color: #f4f4f4; }
.vault-item-user { font-size: 0.9rem; color: #b3c6ff; }
.vault-item .button.secondary { width: auto; font-size: 0.9rem; padding: 6px 12px; }

#add-entry-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding-top: 24px;
    border-top: 1px solid #555;
}