/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --amoled-bg: #000000;
    --card-dark: #0a0a0a;
    --neon-blue: #00f2fe;
    --neon-purple: #bd00ff;
    --neon-pink: #ff0055;
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-main: #ffffff;
    --text-muted: #888888;
    --font-stack: 'Outfit', sans-serif;
}

/* Animated Border Keyframes */
@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Loading Dots Animation */
/* Loading Dots Animation - Robust Opacity Method */
@keyframes fadeDot {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.loading-dots span {
    animation: fadeDot 1.4s infinite;
    opacity: 0;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0.0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}



* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--amoled-bg);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(189, 0, 255, 0.08) 0%, transparent 25%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-stack);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    padding-bottom: 50px;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
header {
    text-align: center;
    margin: 40px 0 30px;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.app-logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.4));
}

@keyframes floatLogo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

header h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
    text-shadow: 0 0 30px rgba(189, 0, 255, 0.3);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Glass Panel */
.glass-panel {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    margin-bottom: 25px;
    transition: transform 0.3s, border-color 0.3s;
}

.glass-panel:hover {
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 20px 50px rgba(0, 242, 254, 0.1);
}

/* Ad Slots */
.ad-slot {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    /* Prevent collapse if empty but active */
}

/* Email Display */
.email-box-wrapper {
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.email-address {
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 35px;
    word-break: break-all;
    cursor: pointer;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    user-select: all;
}

.email-address:active {
    border-color: var(--neon-blue);
    background: rgba(0, 242, 254, 0.05);
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    white-space: nowrap;
    font-family: var(--font-stack);
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(0, 242, 254, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Progress Bar */
.progress-container {
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    width: 100%;
}

.progress-bar {
    height: 100%;
    background: var(--neon-blue);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 15px var(--neon-blue);
}

/* Inbox */
.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.inbox-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

/* Inbox Panel Special Styling */
/* Inbox Panel Special Styling */
/* Inbox Panel Special Styling */
#emailListPanel {
    position: relative;
    padding: 30px;
    margin-bottom: 120px !important;
    /* Force large gap */
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    /* Visible border around inbox section */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* Email List */
.email-item {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    /* More visible separator */
    padding: 20px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    gap: 18px;
    align-items: center;
}

.email-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.email-item:last-child {
    border-bottom: none !important;
}

.sender-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #000;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.email-info {
    flex-grow: 1;
    min-width: 0;
}

.email-info h4 {
    color: #fff;
    margin-bottom: 6px;
    font-size: 1rem;
    font-weight: 600;
}

.email-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-time {
    color: #fff;
    font-size: 0.8rem;
    background: rgba(189, 0, 255, 0.1) !important;
    /* Very Light Transparent Purple */
    border: 1px solid rgba(189, 0, 255, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: none;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #111;
    width: 100%;
    max-width: 650px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: #fff;
}

.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
}

.close-modal:hover {
    opacity: 1;
    color: var(--neon-pink);
}

/* Forms */
.form-control {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 16px;
    color: #fff;
    font-size: 1rem;
    border-radius: 12px;
    outline: none;
    width: 100%;
    font-family: var(--font-stack);
    transition: 0.2s;
}

.form-control:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.domain-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    color: #aaa;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile */
@media (max-width: 600px) {
    header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        text-align: left !important;
        margin: 20px 0;
    }

    .logo-container {
        margin-bottom: 0;
    }

    .app-logo {
        width: 50px;
        height: 50px;
    }

    .header-content h1 {
        font-size: 1.8rem;
        margin-bottom: 2px;
    }

    .header-content .subtitle {
        font-size: 0.85rem;
    }

    #qrBtn {
        display: none !important;
    }

    .container {
        padding: 10px;
        /* Reduced container padding */
    }

    #emailListPanel {
        padding: 15px 10px;
        /* drastically reduced padding for full width feel */
        margin-bottom: 40px;
    }

    .toolbar {
        gap: 8px;
    }

    .btn {
        width: 48%;
        flex-grow: 1;
        padding: 12px;
        font-size: 0.85rem;
    }

    .email-item {
        padding: 15px 10px;
        /* Compact email items */
        gap: 12px;
        position: relative;
    }

    .sender-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .email-info h4 {
        max-width: 65%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.95rem;
    }

    .email-time {
        position: absolute;
        top: 15px;
        right: 10px;
        font-size: 0.7rem;
    }

    .modal-header {
        align-items: flex-start;
    }

    .modal-header h3 {
        font-size: 1.2rem;
        margin-top: 5px;
    }

    .modal-content {
        padding: 20px;
    }
}

.email-body {
    line-height: 1.6;
    color: #ddd;
    font-size: 1rem;
}

a {
    color: var(--neon-blue);
    text-decoration: none;
}

footer a {
    color: #666;
    transition: 0.2s;
}

footer a:hover {
    color: #fff;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

:root {
    --bg-dark: #0f0c29;
    --bg-panel: #1a1a2e;
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #f50057;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-stack: 'Inter',
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    /* Remove blue tap box on mobile */
}

body {
    background: linear-gradient(135deg, var(--bg-dark), #302b63, #24243e);
    color: var(--text-main);
    font-family: var(--font-stack);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    padding-bottom: 50px;
    /* Space for scroll on mobile */
}

/* Background Animation Removed */

.container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin: 30px 0;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    /* Responsive font size */
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Glass Card */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Main Email Display */
.email-box-wrapper {
    padding: 30px;
    text-align: center;
    position: relative;
}

.email-address {
    font-size: clamp(1.2rem, 4vw, 2rem);
    /* Dynamic resizing */
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 25px;
    word-break: break-all;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    cursor: pointer;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    border: 1px dashed var(--glass-border);
    user-select: all;
    /* Easier selection on mobile */
}

.email-address:active {
    background: rgba(0, 242, 254, 0.1);
}

.toolbar {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* SEO & FAQ Content */
.seo-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    color: #ddd;
    line-height: 1.7;
}

.content-block {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.seo-content h2 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.seo-content p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.seo-content ul {
    list-style: none;
    padding-left: 0;
}

.seo-content ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.seo-content ul li::before {
    content: "➞";
    position: absolute;
    left: 0;
    color: var(--neon-blue);
}

.faq-section {
    margin-top: 50px;
}

.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item details summary {
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    list-style: none;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: 0.3s;
    position: relative;
}

.faq-item details summary::-webkit-details-marker {
    display: none;
}

.faq-item details summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    color: var(--neon-blue);
    transition: transform 0.3s;
}

.faq-item details[open] summary::after {
    transform: rotate(45deg);
    color: var(--neon-pink);
}

.faq-item details[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: rgba(255, 255, 255, 0.08);
}

.faq-item details p {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    margin-bottom: 0;
}

.btn-primary {
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
    min-width: 120px;
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Timer Bar */
.progress-container {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    width: 100%;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--primary);
}

/* Inbox */
.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px;
}

.inbox-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.email-item {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.email-item:hover,
.email-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.sender-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    font-size: 1.1rem;
}

.email-info {
    flex-grow: 1;
    min-width: 0;
    /* Fix flex text overflow */
}

.email-info h4 {
    color: var(--text-main);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.email-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-time {
    color: var(--secondary);
    font-size: 0.75rem;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    /* Center on desktop */
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #1a1a2e;
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
    position: sticky;
    top: 0;
    background: var(--bg-panel);
    z-index: 5;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 10px;
}

.input-group {
    display: flex;
    flex-direction: column;
    /* Stack on mobile default */
    gap: 10px;
    margin-top: 20px;
}

.form-control {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 15px;
    color: white;
    font-size: 1rem;
    border-radius: 8px;
    outline: none;
    width: 100%;
}

.domain-badge {
    background: var(--glass-border);
    padding: 15px;
    color: var(--text-muted);
    border-radius: 8px;
    text-align: center;
}

/* Mobile Specific Optimizations */
@media (max-width: 600px) {
    #qrBtn {
        display: none !important;
    }

    .container {
        padding: 10px;
    }

    .toolbar {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        padding: 15px;
        font-size: 1rem;
    }

    /* Email List Items */
    .email-item {
        padding: 15px 10px;
        position: relative;
        /* For absolute time */
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .sender-avatar {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .email-info {
        width: 100%;
        overflow: hidden;
        /* Contain text */
    }

    .email-info h4 {
        font-size: 0.95rem;
        margin-bottom: 2px;
        max-width: 55%;
        /* Leave room for Date/Time */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .email-info p {
        font-size: 0.85rem;
    }

    .email-time {
        position: absolute;
        top: 15px;
        right: 10px;
        font-size: 0.7rem !important;
        /* Force small font */
        color: var(--secondary);
        background: rgba(0, 0, 0, 0.2);
        /* Legibility */
        padding: 2px 6px;
        border-radius: 4px;
        white-space: nowrap;
    }

    /* Modal Header - Fix Alignment */
    .modal-header {
        flex-direction: row;
        /* Horizontal */
        justify-content: space-between;
        align-items: flex-start;
        gap: 15px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
        word-break: break-word;
        text-align: left;
    }

    .close-modal {
        font-size: 2rem;
        padding: 0;
        margin-top: -5px;
    }

    /* Fix Layout in Read Modal */
    .modal-content>div[style*="justify-content:space-between"] {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 15px !important;
    }

    #readSender {
        font-size: 0.9rem;
    }

    #readDate {
        font-size: 0.8rem;
        color: var(--text-muted);
    }

    /* AI Section & Dropdown */
    .ai-section>div {
        flex-direction: column !important;
    }

    .ai-section button {
        width: 100% !important;
        margin-bottom: 8px;
    }

    /* Styled Select Dropdown */
    #langSelect {
        width: 100% !important;
        margin-bottom: 8px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid var(--glass-border) !important;
        color: white !important;
        border-radius: 50px !important;
        appearance: none;
        -webkit-appearance: none;
        text-align: center;
        font-weight: 600;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 20px center;
    }

    .modal-overlay {
        padding: 10px;
    }

    .input-group {
        flex-direction: column;
    }
}

/* Show modal */
.modal-overlay.active {
    display: flex;
}

.email-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    line-height: 1.6;
}