body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
}

.container {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 350px;
}

h1 {
    font-size: 1.8rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
}

p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 90%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
}

button {
    width: 95%;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 10px;
}

button:hover {
    background-color: #0056b3;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 25px 0;
}

/* QR Code Styles */
#qrContainer {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrContainer img {
    border: 5px solid #fff;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Login/Auth Page Styles */
.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: -10px;
}

.user-header p {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
}

#logout-btn {
    width: auto;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: normal;
    background-color: #dc3545;
}
#logout-btn:hover {
    background-color: #c82333;
}

.error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: -10px;
}

/* Add this to the end of style.css */

.form-link {
    font-size: 0.9rem;
    color: #555;
    margin-top: 20px;
}

.form-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.form-link a:hover {
    text-decoration: underline;
}

/* History Section */
#history-container {
    margin-top: 30px;
    text-align: left;
    width: 100%;
    max-width: 350px; /* Match container width */
    margin-left: auto;
    margin-right: auto;
}

#history-container h3 {
    font-size: 1.1rem;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

#history-list {
    list-style: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto; /* Scroll if list is long */
}

#history-list li {
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #555;
}

#history-list li span {
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis; /* Adds ... if text is too long */
    max-width: 200px;
}

.history-btn {
    width: auto;
    padding: 4px 8px;
    font-size: 0.75rem;
    background-color: #6c757d;
    margin-bottom: 0;
}

.history-btn:hover {
    background-color: #5a6268;
}
