:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    --accent: #8b5cf6;
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    
    --bg-base: #090d16;
    --bg-surface: #0f172a;
    --bg-card: rgba(19, 28, 49, 0.75);
    --bg-card-hover: rgba(30, 41, 69, 0.85);
    --border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.35);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
}

[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border: rgba(15, 23, 42, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.4);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient Background Glow */
.ambient-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    transition: opacity 0.5s ease;
}
.glow-1 {
    top: -200px;
    left: 20%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}
.glow-2 {
    bottom: -150px;
    right: 15%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

/* Glassmorphism Utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 2.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.brand-name {
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.brand-suffix {
    color: var(--primary);
    font-weight: 800;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--success-light);
    color: var(--success);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin-left: 0.5rem;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: dotPulse 1.8s infinite;
}

@keyframes dotPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon-nav {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--border);
    border: 1px solid var(--border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-nav:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Container */
.container {
    max-width: 920px;
    margin: 2rem auto;
    padding: 0 1.25rem;
    position: relative;
    z-index: 1;
}

/* Main Hero Card */
.main-card {
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-highlight);
    box-shadow: var(--shadow-glow), var(--shadow-md);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-tagline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.card-tagline i {
    color: var(--success);
    font-size: 1.1rem;
}

/* Tabs */
.tabs-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tabs {
    display: flex;
    gap: 0.4rem;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md);
    background: var(--border);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tab-close {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.tab-close:hover {
    color: #ff8787;
}

.btn-tab-add {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    border: 1px dashed var(--primary);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-tab-add:hover {
    background: var(--primary);
    color: white;
    border-style: solid;
}

/* Email Hero Box */
.email-hero-box {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.input-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    cursor: pointer;
}

.input-wrapper:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.input-wrapper.copied-glow {
    border-color: var(--success) !important;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.45) !important;
    animation: pulseBorder 0.5s ease-in-out;
}

@keyframes pulseBorder {
    0% { transform: scale(1); }
    50% { transform: scale(1.008); }
    100% { transform: scale(1); }
}

.input-icon {
    position: absolute;
    left: 1.1rem;
    font-size: 1.4rem;
    color: var(--text-dim);
    pointer-events: none;
}

#email-address {
    width: 100%;
    padding: 1rem 5.5rem 1rem 3.25rem;
    background: transparent;
    border: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.5px;
    outline: none;
    cursor: pointer;
    user-select: all;
}

.click-hint {
    position: absolute;
    right: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--border);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    pointer-events: none;
}

.input-wrapper:hover .click-hint {
    color: var(--primary);
    background: var(--primary-light);
}

/* Action Buttons Group */
.action-buttons-group {
    display: flex;
    gap: 0.5rem;
}

button {
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.copied {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: white !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45) !important;
    transform: scale(1.02);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    padding: 0.85rem 1.15rem;
    font-size: 0.95rem;
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

.btn-danger-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn-danger-ghost:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.btn-ghost:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

.btn-small {
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* Feature Pills */
.feature-pills {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.pill-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

.pill-item i {
    color: var(--primary);
    font-size: 0.95rem;
}

/* QR Panel */
.qr-panel {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    animation: fadeIn 0.3s ease-out;
}

.qr-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.qr-title {
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

#qrcode {
    display: flex;
    justify-content: center;
}

/* Timer Section */
.timer-section {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.timer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
    font-size: 0.9rem;
}

.timer-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
}

.timer-label i {
    color: var(--warning);
    font-size: 1.1rem;
}

.timer-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    width: 100%;
    transition: width 1s linear, background 0.4s ease;
    border-radius: var(--radius-full);
}

/* Inbox Section */
.inbox-section {
    margin-top: 2rem;
}

.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.inbox-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inbox-title-group h2 {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inbox-title-group h2 i {
    color: var(--primary);
}

.badge-count {
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    min-width: 24px;
    text-align: center;
}

.inbox-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.live-radar {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    position: relative;
}

.live-radar::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--success);
    animation: radarRipple 2s infinite ease-out;
}

@keyframes radarRipple {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

.refresh-btn i.spinning {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Inbox Container & Cards */
.inbox-container {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.email-accordion-group {
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.25s ease;
}

.email-list-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.email-list-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.email-list-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.email-list-content {
    flex-grow: 1;
    overflow: hidden;
}

.email-list-sender {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-list-subject {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-snippet {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 600px;
}

.email-list-time {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion-caret {
    font-size: 1rem;
    color: var(--text-dim);
    transition: transform 0.25s ease;
}

.accordion-caret.open {
    transform: rotate(180deg);
    color: var(--primary);
}

/* OTP Chip on List Card */
.otp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.45rem;
    transition: all 0.2s ease;
    width: fit-content;
}

.otp-chip:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.otp-chip strong {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.otp-copy-label {
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* OTP Banner in Reader Panel */
.otp-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.4rem;
    margin: 1.25rem 1.5rem 0.5rem;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.otp-banner-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.otp-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.otp-banner-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

.otp-banner-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.otp-code-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.otp-digits {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: var(--primary);
    background: var(--bg-surface);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--primary);
}

.btn-copy-otp {
    padding: 0.6rem 1rem !important;
    font-size: 0.85rem !important;
}

/* Reader Panel */
.email-reader-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    overflow: hidden;
    margin-top: -6px;
    padding-top: 6px;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.reader-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
    flex-wrap: wrap;
    gap: 1rem;
}

.reader-meta {
    font-size: 0.9rem;
    line-height: 1.6;
}

.reader-meta strong {
    color: var(--text-muted);
    margin-right: 0.4rem;
}

.reader-date {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-top: 2px;
}

.reader-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

/* Attachments */
.attachments-list {
    padding: 1rem 1.5rem;
    border-bottom: 1px dashed var(--border);
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.attachment-link {
    background: var(--bg-surface);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.attachment-link i {
    color: var(--primary);
    font-size: 1.1rem;
}

.attachment-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.attachment-link:hover i {
    color: white;
}

/* Reader Body Container */
.reader-body-container {
    background: #ffffff;
    min-height: 250px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
}

.reader-body-container iframe {
    width: 100%;
    min-height: 480px;
    border: none;
    display: block;
}

.reader-body-container pre {
    padding: 1.5rem;
    margin: 0;
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1e293b;
    background: #ffffff;
}

/* Empty State with Animated Radar */
.empty-state {
    text-align: center;
    padding: 4.5rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    color: var(--text-muted);
}

.empty-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon-wrapper i {
    font-size: 3.5rem;
    color: var(--primary);
    position: relative;
    z-index: 2;
}

.radar-wave {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px dashed rgba(99, 102, 241, 0.4);
    animation: rotateWave 12s linear infinite;
}

@keyframes rotateWave {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto;
    color: var(--text-dim);
}

/* Skeleton Loading */
.skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.skeleton-item {
    height: 80px;
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255, 255, 255, 0.05) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Modal Overlay & Card */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.25rem;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-highlight);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    animation: popUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popUp {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-title-group i {
    color: var(--primary);
    font-size: 1.4rem;
}

.modal-title-group h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-dim);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.modal-tabs {
    display: flex;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.modal-tab {
    flex: 1;
    background: transparent;
    padding: 0.65rem 0.5rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.custom-input-group {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.75rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s ease;
}

.custom-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

.custom-icon {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-right: 0.5rem;
}

.custom-input-group input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.6rem 0.2rem;
    outline: none;
}

.domain-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    padding-left: 0.5rem;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-select:focus {
    border-color: var(--primary);
}

.select-caret {
    position: absolute;
    right: 1rem;
    pointer-events: none;
    color: var(--text-dim);
    font-size: 1rem;
}

.btn-generate {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: var(--radius-md);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: var(--bg-surface);
    color: var(--text-main);
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

@keyframes toastSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast.hiding {
    animation: toastFadeOut 0.25s forwards;
}

@keyframes toastFadeOut {
    to { opacity: 0; transform: translateY(10px); }
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.footer strong {
    color: var(--text-muted);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar { padding: 1rem; }
    .main-card { padding: 1.5rem 1.25rem; }
    .email-hero-box { flex-direction: column; }
    .action-buttons-group { width: 100%; flex-wrap: wrap; }
    .action-buttons-group button { flex: 1; min-width: 60px; }
    #email-address { font-size: 1.15rem; padding-right: 4.5rem; }
    .hide-mobile { display: none; }
    .card-top-bar { flex-direction: column; align-items: flex-start; }
    .tabs-wrapper { width: 100%; }
    .inbox-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .inbox-actions { width: 100%; justify-content: space-between; }
    #toast-container { left: 16px; right: 16px; bottom: 16px; }
    .otp-banner { flex-direction: column; align-items: flex-start; }
    .otp-code-box { width: 100%; justify-content: space-between; }
    .reader-header-bar { flex-direction: column; gap: 0.75rem; }
    .reader-actions { width: 100%; justify-content: flex-start; }
}
