    /* Access mode description styling */
#access-description-section {
    transition: all 0.3s ease;
}

#access-description-text {
    line-height: 1.4;
}

/* Mobile responsive for description */
@media (max-width: 640px) {
    #access-description-text {
        font-size: 0.8rem;
        line-height: 1.3;
    }
}
/* Access Mode Colors */
.access-mode-active {
    background: linear-gradient(135deg, #0f4c75 0%, #1e3a8a 100%) !important;
}

.access-mode-active .glass-effect {
    background: rgba(15, 76, 117, 0.25) !important;
    border: 1px solid rgba(100, 200, 255, 0.3) !important;
}
body {
font-family: 'Inter', sans-serif;
background: linear-gradient(135deg, #1e3a8a 0%, #7e22ce 100%);
min-height: 100vh;
}
.glass-effect {
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.email-item {
transition: all 0.2s ease;
cursor: pointer;
}
.email-item:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-1px);
}
.email-item.active {
background: rgba(168, 85, 247, 0.3);
}
#loader {
border: 3px solid rgba(255, 255, 255, 0.3);
border-top: 3px solid #fff;
border-radius: 50%;
width: 25px;
height: 25px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.fade-in {
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}


/* Custom Modal */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
backdrop-filter: blur(5px);
}
.modal-content {
background: linear-gradient(135deg, #1e293b 0%, #374151 100%);
border-radius: 16px;
padding: 2rem;
max-width: 400px;
width: 90%;
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}
.modal-buttons {
display: flex;
gap: 12px;
margin-top: 1.5rem;
}
.modal-btn {
flex: 1;
padding: 12px 20px;
border-radius: 10px;
font-weight: 600;
transition: all 0.2s ease;
border: none;
cursor: pointer;
}
.modal-btn-confirm {
background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
color: white;
}
.modal-btn-confirm:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}
.modal-btn-cancel {
background: rgba(255, 255, 255, 0.1);
color: white;
border: 1px solid rgba(255, 255, 255, 0.2);
}
.modal-btn-cancel:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
}

/* Improved inbox list styling */
#email-list-container {
height: calc(100% - 60px);
overflow-y: auto;
}
.email-list-item {
padding: 12px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
transition: all 0.2s ease;
cursor: pointer;
}
.email-list-item:hover {
background: rgba(255, 255, 255, 0.1);
}
.email-list-item.active {
background: rgba(168, 85, 247, 0.3);
}
.email-preview {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

@media (max-width: 768px) {
.mobile-stack { flex-direction: column; }
.mobile-full { width: 100%; }
.mobile-text-center { text-align: center; }
.mobile-inbox-container { flex-direction: column; height: auto; }
.mobile-inbox-list { height: 300px; max-height: 300px; }
.mobile-email-content { height: 400px; max-height: 400px; }
}

@media (min-width: 768px) {
#email-content-container {
height: 550px;
max-height: 550px;
}
#email-body {
height: 350px;
max-height: 350px;
}
}
/* Mobile single box design */
@media (max-width: 768px) {
    #inbox-main-container {
        height: 500px !important;
        max-height: 500px !important;
    }
    
    #desktop-email-content {
        display: none !important;
    }
    
    #back-to-list {
        display: flex !important;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 8px;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
}

/* Desktop two-panel design */
@media (min-width: 768px) {
    #inbox-main-container {
        height: 500px !important;
        width: 40% !important;
    }
    
    #desktop-email-content {
        display: block !important;
        height: 500px !important;
        width: 58% !important;
    }
    
    #back-to-list {
        display: none !important;
    }
}

/* Access Mode Colors */
.access-mode {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f4c75 100%) !important;
}

.access-mode-bg {
    background: rgba(15, 76, 117, 0.2) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(100, 200, 255, 0.3) !important;
}

.access-mode .glass-effect {
    background: rgba(15, 76, 117, 0.25) !important;
    border: 1px solid rgba(100, 200, 255, 0.2) !important;
}

/* iFrame Email System */
.email-iframe-wrapper {
    width: 100%;
    height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.sandboxed-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* Replace the existing .email-fallback styles with these: */
.email-fallback {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    color: #e5e7eb;
    line-height: 1.6;
    height: 100%;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.email-fallback p {
    margin-bottom: 1rem;
    color: #d1d5db;
}

.email-fallback a {
    color: #60a5fa;
    text-decoration: underline;
}

.email-fallback code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #e5e7eb;
}

.email-fallback pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

/* Add these new styles for better email content */
.email-content {
    background: rgba(0, 0, 0, 0.2);
    color: #e5e7eb;
    line-height: 1.6;
    padding: 16px;
    border-radius: 8px;
}

.email-original {
    background: white;
    color: black;
    padding: 20px;
    border-radius: 8px;
    font-family: inherit;
    line-height: 1.6;
}

.email-original h1, 
.email-original h2, 
.email-original h3 {
    color: black;
    margin-bottom: 1rem;
}

.email-original p {
    color: black;
    margin-bottom: 1rem;
}

.email-original a {
    color: #0066cc;
    text-decoration: underline;
}

/* Dark mode support */
.dark .email-original {
    background: #1f2937;
    color: #e5e7eb;
}

.dark .email-original h1,
.dark .email-original h2, 
.dark .email-original h3 {
    color: #f9fafb;
}

.dark .email-original p {
    color: #e5e7eb;
}

.dark .email-original a {
    color: #60a5fa;
}
/* Make iframe background dark too */
.sandboxed-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #1f2937; /* Dark gray background */
}

.email-iframe-wrapper {
    width: 100%;
    height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    background: #1f2937; /* Dark background for wrapper */
}
/* Smooth transitions */
#email-list-view, #email-content-view {
    transition: opacity 0.3s ease;
}

.border-red-500 {
    border-color: #ef4444 !important;
}
/* Add to your existing CSS */
.bg-blue-600 {
    background-color: #2563eb;
}
.bg-blue-600:hover {
    background-color: #1d4ed8;
}
.admin-mode {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%) !important;
}
.admin-header {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}
.admin-text {
    color: #fbbf24 !important;
    font-weight: bold;
}

/* Add to your existing CSS */
.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading:hover {
    transform: none !important;
}
/* Square Access Button Styles */
#access-door-btn {
    aspect-ratio: 1;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#access-door-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Fix Access button size on mobile */
/* Fix Access button container on mobile */
@media (max-width: 640px) {
    /* Make Access button container not flex */
    #mail-creation-section .flex-col.sm\:flex-row > div:last-child {
        flex: none !important;
        width: auto !important;
    }
    
    /* Make the buttons stay in same row */
    #mail-creation-section .flex-col.sm\:flex-row {
        flex-direction: row !important;
        align-items: center;
    }
    
    /* Random button takes available space */
    #mail-creation-section .flex-col.sm\:flex-row > div:first-child {
        flex: 1 !important;
        margin-right: 8px;
    }
    
    /* Fix Access button size */
    #access-door-btn {
        min-height: 45px !important;
        min-width: 45px !important;
        width: 45px !important;
        height: 55px !important;
        padding: 6px !important;
        flex: none !important;
    }
}

#big-random-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border: none;
    color: white;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 16px;
    transition: all 0.3s ease;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

/* Smooth hover effect */
#big-random-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
}

/* Access Modal specific styles */
.access-modal-btn {
    background: linear-gradient(135deg, #2563eb 0%, #0d9488 100%) !important;
    border: none;
}

.access-modal-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #0f766e 100%) !important;
    transform: translateY(-1px);
}



/* Make access button square with same height as random button */
#access-door-btn {
    aspect-ratio: 1; /* This makes it square */
    height: 100%; /* Take full height of container */
    min-height: 60px; /* Match random button height */
    min-width: 60px; /* Ensure it's square */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px; /* Reduced padding for square */
    background: linear-gradient(135deg, #2563eb 0%, #0d9488 100%);
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    text-align: center;
}

#access-door-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #0f766e 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* Adjust icon and text for square button */
#access-door-btn i {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

#access-door-btn {
    font-size: 0.8rem;
    line-height: 1.1;
}

/* Make sure both buttons have same height by controlling their containers */
#mail-creation-section .flex-col.sm\:flex-row {
    align-items: stretch; /* This makes children same height */
}

#mail-creation-section .flex-col.sm\:flex-row > div {
    display: flex;
    flex-direction: column;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    #access-door-btn {
        min-height: 55px;
        min-width: 55px;
        padding: 6px;
    }
    
    #access-door-btn i {
        font-size: 1.1rem;
        margin-bottom: 3px;
    }
    
    #access-door-btn {
        font-size: 0.7rem;
    }
}
/* Fix access mode email display responsiveness */
@media (max-width: 640px) {
    #access-email-display {
        font-size: 0.8rem !important;
        word-break: break-all !important;
        overflow-wrap: break-word !important;
        padding: 0 8px !important;
    }
    
    .access-mode-active #access-email-display {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }
    
    /* Make the email display container more compact */
    .access-mode-active .bg-gray-900 {
        padding: 8px 12px !important;
    }
    
    /* Adjust the grid layout for smaller screens */
    .access-mode-active .grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    
    /* Make access mode display more compact */
    #access-mode-display {
        padding: 12px !important;
    }
    
    #access-mode-display .p-6 {
        padding: 16px !important;
    }
}

/* Additional responsive fixes for very small screens */
@media (max-width: 400px) {
    #access-email-display {
        font-size: 0.7rem !important;
    }
    
    .access-mode-active .text-lg {
        font-size: 0.9rem !important;
    }
}