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

:root {
    --primary-color: #4f46e5;
    --secondary-color: #6366f1;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --border: #e5e7eb;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 48px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 10px;
}

main {
    display: grid;
    gap: 30px;
}

.validation-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.validation-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.subtitle {
    color: var(--gray);
    margin-bottom: 25px;
}

.upload-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--light);
    border: 2px dashed var(--border);
    border-radius: 8px;
    transition: all 0.3s;
}

.upload-section:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.upload-label:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.upload-label i {
    font-size: 1.2rem;
}

.file-name {
    color: var(--dark);
    font-weight: 500;
    flex: 1;
}

.btn-clear-file {
    padding: 8px 12px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-clear-file:hover {
    background: #dc2626;
}

.divider {
    text-align: center;
    color: var(--gray);
    margin: 20px 0;
    position: relative;
    font-weight: 600;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--border);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.input-section textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: border-color 0.3s;
}

.input-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-secondary {
    background: var(--gray);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-warning:hover {
    background: #d97706;
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-info:hover {
    background: #2563eb;
}

.results-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.results-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-item {
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--border);
}

.stat-item i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-item.valid {
    border-color: var(--success-color);
    background: #ecfdf5;
}

.stat-item.valid i {
    color: var(--success-color);
}

.stat-item.catchall {
    border-color: var(--warning-color);
    background: #fffbeb;
}

.stat-item.catchall i {
    color: var(--warning-color);
}

.stat-item.invalid {
    border-color: var(--danger-color);
    background: #fef2f2;
}

.stat-item.invalid i {
    color: var(--danger-color);
}

.stat-item.total {
    border-color: var(--info-color);
    background: #eff6ff;
}

.stat-item.total i {
    color: var(--info-color);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.results-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    background: var(--light);
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: white;
    border: 1px solid var(--border);
}

.result-item.valid {
    border-left: 4px solid var(--success-color);
}

.result-item.catchall {
    border-left: 4px solid var(--warning-color);
}

.result-item.invalid {
    border-left: 4px solid var(--danger-color);
}

.result-email {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    flex: 1;
}

.result-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.result-status.valid {
    color: var(--success-color);
}

.result-status.catchall {
    color: var(--warning-color);
}

.result-status.invalid {
    color: var(--danger-color);
}

.result-details {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 5px;
    font-style: italic;
}

.export-section {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading p {
    font-size: 1.1rem;
}

.info-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.info-section h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.feature {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: var(--light);
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.feature p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.9;
}

/* Scrollbar Styling */
.results-list::-webkit-scrollbar {
    width: 8px;
}

.results-list::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 4px;
}

.results-list::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

.results-list::-webkit-scrollbar-thumb:hover {
    background: var(--dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .validation-card {
        padding: 25px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .export-section {
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}
