@import url('https://fonts.googleapis.com/css2?family=Cal+Sans&family=Noto+Sans:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Noto Sans', sans-serif;
    background: #fafafa;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    height: 40px;
    margin-bottom: 12px;
}

h1 {
    font-family: 'Cal Sans', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.badge {
    background: #000;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.input-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.tab {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab.active {
    color: #000;
    border-bottom-color: #000;
}

.tab-content {
    display: none;
    flex: 1;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

#emailInput {
    width: 100%;
    flex: 1;
    min-height: 200px;
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 14px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

#emailInput:focus {
    border-color: #000;
}

.upload-zone {
    flex: 1;
    border: 2px dashed #e5e5e5;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 40px;
    text-align: center;
}

.upload-zone:hover {
    border-color: #000;
    background: #fafafa;
}

.upload-zone.dragover {
    border-color: #000;
    background: #f5f5f5;
}

.upload-zone svg {
    color: #999;
    margin-bottom: 12px;
}

.upload-zone p {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

.upload-zone .sub {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-top: 12px;
}

.file-info span {
    font-size: 14px;
    color: #1a1a1a;
}

.clear-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}

.validate-btn {
    width: 100%;
    padding: 16px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s;
}

.validate-btn:hover {
    background: #333;
}

.validate-btn:active {
    transform: scale(0.98);
}

.validate-btn:disabled {
    background: #e5e5e5;
    color: #999;
    cursor: not-allowed;
}

.results-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.results-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.back-btn {
    background: none;
    border: 1px solid #e5e5e5;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    border-color: #000;
    background: #fafafa;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card.valid {
    border-left: 4px solid #10b981;
}

.stat-card.uncertain {
    border-left: 4px solid #f59e0b;
}

.stat-card.invalid {
    border-left: 4px solid #ef4444;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card.valid .stat-value {
    color: #10b981;
}

.stat-card.uncertain .stat-value {
    color: #f59e0b;
}

.stat-card.invalid .stat-value {
    color: #ef4444;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.progress-bar {
    background: #f5f5f5;
    border-radius: 8px;
    height: 48px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #000 0%, #333 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.actions {
    margin-bottom: 20px;
}

.download-btn {
    width: 100%;
    padding: 14px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.download-btn:hover {
    background: #333;
}

.download-btn:disabled {
    background: #e5e5e5;
    color: #999;
    cursor: not-allowed;
}

.results-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.result-tab {
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.result-tab.active {
    color: #000;
    border-bottom-color: #000;
}

.results-list {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-y: auto;
    flex: 1;
    max-height: 400px;
}

.email-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    font-family: 'Noto Sans', monospace;
}

.email-item:last-child {
    border-bottom: none;
}

.email-item.valid {
    color: #10b981;
}

.email-item.uncertain {
    color: #f59e0b;
}

.email-item.invalid {
    color: #ef4444;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

@media (max-width: 640px) {
    .container {
        padding: 16px;
    }

    h1 {
        font-size: 20px;
    }

    .stats {
        gap: 8px;
    }

    .stat-card {
        padding: 16px 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    .results-list {
        max-height: 300px;
    }
}