/* EZ Temp Mail - Modern Stylesheet */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-glow: rgba(37, 99, 235, 0.25);
    --secondary: #64748b;
    --secondary-hover: #475569;
    --success: #10b981;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-subtle: #f1f5f9;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --header-bg: radial-gradient(circle at 50% 10%, #1e293b 0%, #0f172a 100%);
    --header-text: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

[data-bs-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.15);
    --primary-glow: rgba(59, 130, 246, 0.35);
    --secondary: #94a3b8;
    --secondary-hover: #cbd5e1;
    --bg-body: #090d16;
    --bg-card: #131b2e;
    --bg-card-subtle: #1e293b;
    --border-color: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --header-bg: radial-gradient(circle at 50% 10%, #0f172a 0%, #060911 100%);
    --header-text: #ffffff;
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Navbar */
.site-navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    line-height: 1.1;
    font-size: 1.25rem;
}

.brand-name .highlight {
    color: #60a5fa;
}

.brand-tagline {
    font-size: 0.72rem;
    font-weight: 400;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-link-custom {
    color: #cbd5e1 !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 6px 14px !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link-custom:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 48px 0 54px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(ellipse at 50% 20%, rgba(59, 130, 246, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: #94a3b8;
    max-width: 650px;
    margin: 0 auto 30px;
}

/* Mailbox Main Card */
.mail-hero-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    max-width: 820px;
    margin: 0 auto;
    color: var(--text-main);
    position: relative;
    z-index: 2;
}

.mail-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card-subtle);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 8px 6px 16px;
    transition: all 0.2s;
}

.mail-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.mail-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--text-main);
    outline: none;
    width: 100%;
    text-overflow: ellipsis;
}

.btn-copy-address {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.btn-copy-address:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-copy-address.copied {
    background: var(--success);
}

/* Mail Actions Toolbar */
.mail-actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card-subtle);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--border-color);
    transform: translateY(-1px);
    color: var(--text-main);
}

.action-btn.btn-refresh {
    color: var(--primary);
    border-color: var(--primary-glow);
}

.action-btn.btn-refresh:hover {
    background: var(--primary-light);
}

.action-btn.btn-danger-custom {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.action-btn.btn-danger-custom:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Polling & Countdown Indicator */
.polling-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.status-live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 9px;
    height: 9px;
    background-color: var(--success);
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: var(--success);
    border-radius: 50%;
    animation: ripple 1.6s infinite ease-out;
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.8); opacity: 0; }
}

.countdown-track {
    width: 90px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.countdown-bar {
    height: 100%;
    width: 100%;
    background: var(--primary);
    transform-origin: left;
    transition: width 0.1s linear;
}

/* Ad Container */
.ad-slot-container {
    max-width: 820px;
    margin: 24px auto;
    padding: 12px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    position: relative;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

/* Inbox Section */
.inbox-section {
    padding: 40px 0 60px;
    flex: 1;
}

.inbox-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    max-width: 960px;
    margin: 0 auto;
}

.inbox-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card-subtle);
}

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

.inbox-badge {
    background: var(--primary);
    color: #ffffff;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

/* Mail Table */
.mail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.mail-table th {
    background: var(--bg-card-subtle);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

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

.mail-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.mail-row:hover {
    background-color: var(--bg-card-subtle);
}

.mail-sender {
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mail-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.mail-subject {
    color: var(--text-main);
    font-weight: 500;
}

.mail-time {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-view-mail {
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.84rem;
    transition: all 0.15s ease;
}

.btn-view-mail:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Empty Inbox Radar Animation (eztempmail style) */
.inbox-empty-container {
    padding: 60px 20px;
    text-align: center;
}

.radar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px dashed rgba(37, 99, 235, 0.35);
    animation: rotateRadar 10s linear infinite;
}

.radar-sweep {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    right: 0;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(37, 99, 235, 0.25) 90deg, transparent 90deg);
    border-radius: 100% 0 0 0;
    transform-origin: bottom left;
    animation: rotateSweep 2.5s linear infinite;
}

.radar-icon {
    font-size: 2.2rem;
    color: var(--primary);
    z-index: 2;
    animation: floatIcon 3s ease-in-out infinite;
}

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

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

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
}

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

/* Features Section */
.features-section {
    padding: 60px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.section-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.section-heading {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0 auto 40px;
}

.feature-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    height: 100%;
    transition: all 0.22s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 1.12rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-text {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0;
}

/* How It Works Steps */
.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

/* FAQ Accordion */
.accordion-custom .accordion-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) !important;
    margin-bottom: 12px;
    overflow: hidden;
}

.accordion-custom .accordion-button {
    background-color: var(--bg-card);
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    padding: 16px 20px;
    box-shadow: none;
}

.accordion-custom .accordion-button:not(.collapsed) {
    background-color: var(--bg-card-subtle);
    color: var(--primary);
}

.accordion-custom .accordion-body {
    padding: 18px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Content Page Layout (Privacy, Terms, About, Contact, etc.) */
.page-header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 50px 0 40px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.page-header p {
    color: #94a3b8;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.legal-content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 36px;
    margin-top: -24px;
    margin-bottom: 60px;
    color: var(--text-main);
}

.legal-content-card h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 6px;
}

.legal-content-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 8px;
}

.legal-content-card p, .legal-content-card li {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-content-card ul, .legal-content-card ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

/* Footer */
.site-footer {
    background: #0b1120;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.footer-top {
    padding: 44px 0 28px;
}

.footer-nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 24px;
    margin-bottom: 24px;
}

.footer-nav-link {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.15s;
}

.footer-nav-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.85rem;
}

/* Toast Notification */
.toast-container-custom {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-toast {
    background: #1e293b;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    font-weight: 500;
    animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid var(--primary);
}

.custom-toast.toast-success { border-left-color: var(--success); }
.custom-toast.toast-error { border-left-color: var(--danger); }

@keyframes slideInToast {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modals */
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-main);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card-subtle);
    padding: 16px 22px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card-subtle);
    padding: 14px 22px;
}

.spin-icon {
    animation: spin 0.8s linear infinite;
}

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

/* Email Reader */
.email-view-meta {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 18px;
}

.email-body-iframe {
    width: 100%;
    min-height: 400px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.email-body-plain {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 480px;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title { font-size: 1.75rem; }
    .mail-hero-box { padding: 18px 14px; }
    .mail-input { font-size: 1.05rem; }
    .action-btn { font-size: 0.85rem; padding: 8px 12px; }
    .legal-content-card { padding: 20px; }
    .mail-table th, .mail-table td { padding: 10px 12px; }
}
