/* ============================================
   MailGuard Pro — Design System
   ============================================ */
:root {
    --bg-primary: #06060f;
    --bg-secondary: #0c0c1d;
    --bg-card: rgba(15, 15, 35, 0.7);
    --bg-card-hover: rgba(20, 20, 45, 0.8);
    --border: rgba(130, 140, 255, 0.1);
    --border-hover: rgba(130, 140, 255, 0.25);
    --text-primary: #e8e8ff;
    --text-secondary: #8888aa;
    --text-muted: #555577;
    --accent-1: #818cf8;
    --accent-2: #c084fc;
    --accent-3: #6366f1;
    --green: #10b981;
    --green-bg: rgba(16, 185, 129, 0.1);
    --red: #f43f5e;
    --red-bg: rgba(244, 63, 94, 0.1);
    --yellow: #f59e0b;
    --yellow-bg: rgba(245, 158, 11, 0.1);
    --blue: #3b82f6;
    --blue-bg: rgba(59, 130, 246, 0.1);
    --purple: #a855f7;
    --purple-bg: rgba(168, 85, 247, 0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Effects */
.bg-grid {
    position: fixed; inset: 0; z-index: 0;
    background-image: linear-gradient(rgba(130,140,255,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(130,140,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}
.bg-glow {
    position: fixed; border-radius: 50%; filter: blur(120px); opacity: 0.15; z-index: 0; pointer-events: none;
}
.bg-glow-1 { width: 600px; height: 600px; background: var(--accent-1); top: -200px; right: -100px; animation: float1 20s ease-in-out infinite; }
.bg-glow-2 { width: 500px; height: 500px; background: var(--accent-2); bottom: -150px; left: -100px; animation: float2 25s ease-in-out infinite; }
.bg-glow-3 { width: 400px; height: 400px; background: var(--accent-3); top: 50%; left: 50%; transform: translate(-50%,-50%); animation: float3 30s ease-in-out infinite; }

@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-80px,80px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(60px,-60px); } }
@keyframes float3 { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.2); } }

/* Particles */
.particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.particle {
    position: absolute; width: 3px; height: 3px; border-radius: 50%;
    background: var(--accent-1); opacity: 0; animation: particleFloat linear infinite;
}
@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-20vh) scale(1); }
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.glass-card:hover { border-color: var(--border-hover); }

/* App Container */
.app { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 24px; min-height: 100vh; }

/* Header */
.header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0; margin-bottom: 32px;
}
.logo { display: flex; align-items: center; gap: 14px; }
.logo-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(129,140,248,0.15), rgba(192,132,252,0.15));
    border: 1px solid rgba(129,140,248,0.2);
    display: flex; align-items: center; justify-content: center;
}
.logo-name { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.logo-pro {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-tagline { display: block; font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.header-badge {
    display: flex; align-items: center; gap: 8px; padding: 8px 16px;
    border-radius: 100px; background: var(--green-bg); border: 1px solid rgba(16,185,129,0.2);
    font-size: 13px; font-weight: 600; color: var(--green);
}
.badge-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--green);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Hero */
.hero { text-align: center; padding: 40px 0 48px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px;
    border-radius: 100px; background: rgba(129,140,248,0.08); border: 1px solid rgba(129,140,248,0.15);
    font-size: 13px; font-weight: 600; color: var(--accent-1); margin-bottom: 24px;
}
.hero-title { font-size: clamp(32px, 5vw, 52px); font-weight: 900; line-height: 1.15; letter-spacing: -1.5px; margin-bottom: 20px; }
.gradient-text {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), #f0abfc);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle { font-size: 17px; color: var(--text-secondary); max-width: 700px; margin: 0 auto 32px; line-height: 1.7; }
.hero-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.feature-chip {
    display: flex; align-items: center; gap: 6px; padding: 8px 16px;
    border-radius: 100px; background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.12);
    font-size: 13px; color: var(--text-secondary); font-weight: 500;
}

/* Upload Section */
.upload-section { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.upload-card { padding: 0; overflow: hidden; }
.upload-zone {
    padding: 64px 40px; text-align: center; cursor: pointer;
    border: 2px dashed rgba(129,140,248,0.15); border-radius: var(--radius);
    margin: 16px; transition: all var(--transition); position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-1); background: rgba(129,140,248,0.04);
}
.upload-zone.dragover { transform: scale(1.01); }
.upload-icon-wrap { position: relative; display: inline-block; margin-bottom: 20px; }
.upload-icon-ring {
    position: absolute; inset: -12px; border-radius: 50%;
    border: 2px solid rgba(129,140,248,0.15); animation: ringPulse 3s ease-in-out infinite;
}
@keyframes ringPulse { 0%,100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.15); opacity: 0; } }
.upload-icon { color: var(--accent-1); }
.upload-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.upload-desc { color: var(--text-secondary); font-size: 14px; margin-bottom: 8px; }
.upload-hint { color: var(--text-muted); font-size: 12px; max-width: 500px; margin: 0 auto; }

/* File Selected */
.file-selected { padding: 24px; }
.file-info {
    display: flex; align-items: center; gap: 16px; padding: 16px 20px;
    background: rgba(129,140,248,0.06); border: 1px solid rgba(129,140,248,0.12);
    border-radius: var(--radius-sm); margin-bottom: 20px;
}
.file-icon-wrap {
    width: 44px; height: 44px; border-radius: 10px;
    background: rgba(129,140,248,0.1); display: flex; align-items: center; justify-content: center;
}
.file-details { flex: 1; }
.file-name { display: block; font-weight: 600; font-size: 14px; }
.file-size { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.file-remove {
    width: 36px; height: 36px; border-radius: 8px; border: none;
    background: rgba(244,63,94,0.1); color: var(--red); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.file-remove:hover { background: rgba(244,63,94,0.2); }

/* Buttons */
.btn-validate {
    width: 100%; padding: 16px 32px; border: none; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white; font-size: 16px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all var(--transition); position: relative; overflow: hidden;
}
.btn-validate:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(129,140,248,0.3); }
.btn-validate:active { transform: translateY(0); }
.btn-validate:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Single Validator */
.single-validator { padding: 24px; }
.single-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 16px;
}
.single-input-row { display: flex; gap: 12px; }
.single-input {
    flex: 1; padding: 14px 18px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 14px; font-family: inherit;
    transition: border-color var(--transition);
}
.single-input:focus { outline: none; border-color: var(--accent-1); }
.single-input::placeholder { color: var(--text-muted); }
.btn-check {
    padding: 14px 28px; border: none; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-3), var(--accent-1));
    color: white; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all var(--transition); white-space: nowrap;
}
.btn-check:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(99,102,241,0.3); }

/* Single Result */
.single-result { margin-top: 16px; padding: 16px 20px; border-radius: var(--radius-sm); animation: slideUp 0.3s ease; }
.single-result.result-valid { background: var(--green-bg); border: 1px solid rgba(16,185,129,0.2); }
.single-result.result-invalid { background: var(--red-bg); border: 1px solid rgba(244,63,94,0.2); }
.single-result.result-risky { background: var(--yellow-bg); border: 1px solid rgba(245,158,11,0.2); }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.single-result-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.single-result-email { font-weight: 600; font-size: 14px; }
.single-result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.single-result-item { font-size: 12px; color: var(--text-secondary); }
.single-result-item span { font-weight: 600; }

/* Progress */
.progress-section { margin-bottom: 32px; }
.progress-card { padding: 32px; }
.progress-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.progress-spinner { width: 48px; height: 48px; flex-shrink: 0; }
.spinner-svg { width: 100%; height: 100%; }
.progress-title { font-size: 18px; font-weight: 700; }
.progress-message { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.progress-bar-wrap {
    width: 100%; height: 6px; background: rgba(255,255,255,0.05);
    border-radius: 100px; overflow: hidden; margin-bottom: 20px;
}
.progress-bar {
    height: 100%; border-radius: 100px; transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    box-shadow: 0 0 16px rgba(129,140,248,0.4);
}
.progress-stats { display: flex; gap: 32px; }
.progress-stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 16px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

/* Summary Grid */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.summary-card {
    display: flex; align-items: center; gap: 14px; padding: 20px;
    border-radius: var(--radius); background: var(--bg-card);
    border: 1px solid var(--border); transition: all var(--transition);
}
.summary-card:hover { transform: translateY(-3px); border-color: var(--border-hover); }
.summary-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.summary-total .summary-icon { background: var(--blue-bg); color: var(--blue); }
.summary-valid .summary-icon { background: var(--green-bg); color: var(--green); }
.summary-invalid .summary-icon { background: var(--red-bg); color: var(--red); }
.summary-risky .summary-icon { background: var(--yellow-bg); color: var(--yellow); }
.summary-disposable .summary-icon { background: var(--purple-bg); color: var(--purple); }
.summary-rate .summary-icon { background: rgba(129,140,248,0.1); color: var(--accent-1); }
.summary-number { display: block; font-size: 24px; font-weight: 800; font-family: 'JetBrains Mono', monospace; letter-spacing: -1px; }
.summary-label { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Action Bar */
.action-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.action-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.action-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 4px; background: rgba(255,255,255,0.03); border-radius: 8px; padding: 3px; }
.filter-tab {
    padding: 8px 16px; border: none; border-radius: 6px; background: transparent;
    color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all var(--transition); font-family: inherit;
}
.filter-tab.active { background: rgba(129,140,248,0.15); color: var(--accent-1); }
.filter-tab:hover:not(.active) { color: var(--text-primary); }
.search-box {
    display: flex; align-items: center; gap: 8px; padding: 8px 14px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 8px;
    color: var(--text-muted);
}
.search-box input {
    background: none; border: none; color: var(--text-primary); font-size: 13px; font-family: inherit;
    width: 160px; outline: none;
}
.search-box input::placeholder { color: var(--text-muted); }

.btn-download, .btn-new {
    display: flex; align-items: center; gap: 8px; padding: 10px 18px;
    border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.btn-download-full { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: white; }
.btn-download-batch { background: rgba(129, 140, 248, 0.1); color: var(--accent-1); border: 1px solid rgba(129,140,248,0.2); }
.btn-download-valid { background: var(--green-bg); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.btn-new { background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-download:hover, .btn-new:hover { transform: translateY(-2px); }

/* Split Control */
.split-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.split-control input {
    background: none;
    border: none;
    border-right: 1px solid var(--border);
    color: var(--accent-1);
    font-size: 13px;
    font-weight: 700;
    width: 60px;
    padding: 0 10px;
    height: 38px;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
}
.split-control .btn-download-batch {
    border: none;
    border-radius: 0;
    height: 38px;
}
.split-control input::placeholder { color: var(--text-muted); }

/* Results Table */
.table-wrap { overflow: hidden; margin-bottom: 32px; }
.table-header-info { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.showing-count { font-size: 13px; color: var(--text-muted); }
.table-scroll { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; }
.results-table th {
    padding: 14px 16px; text-align: left; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted);
    background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border);
    white-space: nowrap; position: sticky; top: 0;
}
.results-table td {
    padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.02);
    font-size: 13px; vertical-align: middle;
}
.results-table tbody tr { transition: background var(--transition); }
.results-table tbody tr:hover { background: rgba(129,140,248,0.04); }
.th-num { width: 50px; }
.th-email { min-width: 200px; }
.th-score { width: 80px; }

/* Status Badges */
.status-badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px;
    border-radius: 100px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.status-valid { background: var(--green-bg); color: var(--green); }
.status-invalid { background: var(--red-bg); color: var(--red); }
.status-risky, .status-catch-all, .status-unknown { background: var(--yellow-bg); color: var(--yellow); }
.status-disposable { background: var(--purple-bg); color: var(--purple); }
.status-error { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* Risk Level */
.risk-badge { padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; }
.risk-low { background: var(--green-bg); color: var(--green); }
.risk-medium { background: var(--yellow-bg); color: var(--yellow); }
.risk-high { background: var(--red-bg); color: var(--red); }

/* Score Bar */
.score-wrap { display: flex; align-items: center; gap: 8px; }
.score-bar { width: 40px; height: 5px; background: rgba(255,255,255,0.05); border-radius: 100px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 100px; transition: width 0.5s ease; }
.score-val { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; }

/* Checks */
.checks-wrap { display: flex; gap: 4px; }
.check-pip {
    width: 20px; height: 20px; border-radius: 4px; font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; cursor: default;
}
.check-pass { background: var(--green-bg); color: var(--green); }
.check-fail { background: var(--red-bg); color: var(--red); }
.check-unknown { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* Email cell */
.email-cell { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-primary); word-break: break-all; }
.company-cell { font-size: 13px; color: var(--text-secondary); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reason-cell { font-size: 12px; color: var(--text-secondary); max-width: 250px; }

/* Pagination */
.table-pagination {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 16px 20px; border-top: 1px solid var(--border);
}
.page-btn {
    width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all var(--transition); font-family: inherit;
    display: flex; align-items: center; justify-content: center;
}
.page-btn.active { background: rgba(129,140,248,0.15); color: var(--accent-1); border-color: rgba(129,140,248,0.3); }
.page-btn:hover:not(.active) { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Footer */
.footer { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 13px; }
.footer-sub { font-size: 11px; margin-top: 6px; opacity: 0.5; }

/* Responsive */
@media (max-width: 768px) {
    .app { padding: 16px; }
    .header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .hero-title { font-size: 28px; }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .action-bar { flex-direction: column; align-items: stretch; }
    .action-left, .action-right { flex-direction: column; }
    .filter-tabs { flex-wrap: wrap; }
    .search-box input { width: 100%; }
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn 0.5s ease; }

/* Paywall Modal */
.paywall-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(6, 6, 15, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.paywall-card {
    max-width: 480px; width: 100%; text-align: center; padding: 48px 32px;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.paywall-icon {
    width: 80px; height: 80px; border-radius: 20px;
    background: rgba(129,140,248,0.1); display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 24px; border: 1px solid rgba(129,140,248,0.2);
}
.paywall-title { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.paywall-desc { font-size: 15px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.6; }
.paywall-input-group { display: flex; flex-direction: column; gap: 16px; }
.paywall-input-group input {
    width: 100%; padding: 16px 20px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 15px; font-family: inherit; text-align: center;
    transition: all var(--transition);
}
.paywall-input-group input:focus { outline: none; border-color: var(--accent-1); background: rgba(255,255,255,0.05); }
.paywall-input-group input::placeholder { color: var(--text-muted); }
.paywall-error { margin-top: 16px; color: var(--red); font-size: 14px; background: var(--red-bg); padding: 12px; border-radius: 8px; border: 1px solid rgba(244,63,94,0.2); }

