* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px; 
    text-align: center;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 { color: #333; font-size: 1.5rem; }
p { color: #666; margin-bottom: 20px; font-size: 0.95rem; }

input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
}

button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover { background-color: #0056b3; }

/* New styling for the Download button */
.success-btn {
    background-color: #28a745;
    margin-top: 15px;
}

.success-btn:hover {
    background-color: #218838;
}

.text-btn {
    width: auto;
    padding: 5px 10px;
    background: none;
    color: #dc3545;
    font-size: 0.9rem;
}

.text-btn:hover {
    background: none;
    text-decoration: underline;
}

#qr-code {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

#qr-code img, #qr-code canvas {
    max-width: 100%;
    height: auto;
}

/* History Styles */
.history-section {
    margin-top: 30px;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.history-section h3 { margin-bottom: 10px; font-size: 1.1rem; }

#history-list {
    list-style-type: none;
    max-height: 150px; 
    overflow-y: auto;
}

#history-list li {
    background: #f9f9f9;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    word-break: break-all;
}

#history-list li:hover { background: #e9ecef; }