/* 
   3omar.hs TempEmail Modern Glassmorphic Stylesheet
   Supports Arabic (RTL), English, Spanish, Portuguese (LTR)
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(18, 24, 38, 0.75);
    --bg-card-hover: rgba(28, 36, 56, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(56, 189, 248, 0.3);
    
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.25);
    --secondary: #818cf8;
    --accent: #10b981;
    --danger: #f43f5e;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
    --font-en: 'Outfit', system-ui, -apple-system, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-en);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(129, 140, 248, 0.08) 0%, transparent 40%);
}

body[dir="rtl"] {
    font-family: var(--font-ar);
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.navbar {
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.85);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.back-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.brand-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 40%, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lang-selector {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.lang-selector:hover {
    border-color: var(--primary);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 35px 0 25px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.hero-title {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.25;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 680px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Generator Card */
.generator-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
    transition: var(--transition);
}

.generator-card:hover {
    border-color: var(--border-accent);
}

.options-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
    text-align: start;
}

@media (max-width: 640px) {
    .options-bar {
        grid-template-columns: 1fr;
    }
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.select-input, .text-input {
    width: 100%;
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.select-input:focus, .text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.email-display-box {
    display: flex;
    align-items: center;
    background: rgba(11, 15, 25, 0.9);
    border: 2px dashed var(--border-accent);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    gap: 12px;
    margin-bottom: 20px;
}

.email-address-text {
    flex: 1;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    word-break: break-all;
    text-align: center;
    padding: 8px 0;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent), #059669);
    color: #fff;
}

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

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.25);
}

/* Timer Countdown */
.timer-container {
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.timer-title {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.countdown-grid {
    display: flex;
    gap: 16px;
    direction: ltr;
}

.countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    min-width: 65px;
}

.countdown-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-en);
}

.countdown-lbl {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-top: 2px;
}

/* Inbox Section */
.inbox-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(16px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.inbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.inbox-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-count {
    background: var(--primary);
    color: #000;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.inbox-actions {
    display: flex;
    gap: 10px;
}

.table-responsive {
    overflow-x: auto;
}

.inbox-table {
    width: 100%;
    border-collapse: collapse;
    text-align: start;
}

.inbox-table th {
    padding: 14px 16px;
    background: rgba(11, 15, 25, 0.8);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.inbox-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    vertical-align: middle;
}

.inbox-table tr {
    transition: var(--transition);
    cursor: pointer;
}

.inbox-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.inbox-table tr.unread {
    font-weight: 700;
    background: rgba(56, 189, 248, 0.05);
}

.sender-name {
    color: var(--text-main);
    font-weight: 600;
}

.sender-email {
    color: var(--text-dim);
    font-size: 12px;
    display: block;
}

.msg-subject {
    color: var(--text-main);
}

.msg-date {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.empty-inbox {
    text-align: center;
    padding: 50px 20px;
}

.empty-icon {
    font-size: 48px;
    color: var(--text-dim);
    margin-bottom: 15px;
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-desc {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
}

/* Features Grid */
.features-section {
    margin-bottom: 50px;
    text-align: center;
}

.sec-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: start;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
}

.feat-icon {
    width: 44px;
    height: 44px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 16px;
}

.feat-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feat-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* Modal View */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: #0f172a;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-backdrop.active .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-meta {
    padding: 15px 20px;
    background: rgba(11, 15, 25, 0.5);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    color: var(--text-main);
    line-height: 1.7;
    font-size: 15px;
}

.modal-body iframe {
    width: 100%;
    min-height: 300px;
    border: none;
    border-radius: var(--radius-sm);
    background: #fff;
}

.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body[dir="rtl"] .toast-container {
    right: auto;
    left: 25px;
}

.toast {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--primary);
    color: var(--text-main);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideUp 0.3s ease;
}

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

footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding: 25px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
}
