.email-display { flex: 1; display: flex; align-items: center; gap: 10px; background: white; border: 1px solid #cbd5e0; border-radius: 8px; padding: 8px 15px; }
/* Header */ .header { background: #2d3748; color: white; padding: 25px 30px; text-align: center; } temp mail script
.detail-header { padding: 20px; border-bottom: 1px solid #e2e8f0; background: #fefcf5; } .email-display { flex: 1
#emailAddress { flex: 1; font-family: monospace; font-size: 1rem; color: #2d3748; word-break: break-all; } border: 1px solid #cbd5e0
.message-item { padding: 15px 20px; border-bottom: 1px solid #edf2f7; cursor: pointer; transition: background 0.2s; }
<div class="email-bar"> <div class="email-display"> <span>📩 Your Temp Email:</span> <span id="emailAddress">loading...</span> </div> <button class="copy-btn" id="copyBtn">📋 Copy</button> <button class="refresh-btn new-email-btn" id="newEmailBtn">🔄 New Email Address</button> <button class="refresh-btn" id="refreshInboxBtn">⟳ Refresh Inbox</button> </div>
// Set a new email (reset inbox) function setNewEmail() { const newEmailAddr = generateNewEmail(); currentEmail = newEmailAddr; selectedMessageId = null; // Ensure we have storage for this email (maybe empty initially) if (!loadMessagesForEmail(currentEmail).length) { saveMessagesForEmail(currentEmail, []); } document.getElementById('emailAddress').innerText = currentEmail; refreshInboxUI(); // Restart auto email generation for new address if (intervalId) clearInterval(intervalId); startAutoGenerateEmails();