:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #e53e3e;
    --dark: #2d3748;
    --light: #f7fafc;
    --gray: #718096;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f7fafc;
    min-height: 100vh;
    padding-top: 80px;
    color: var(--dark);
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

header {
    background: var(--primary);
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

main {
    padding: 2rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray);
    border-radius: var(--radius);
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
    margin-bottom: 1.5rem;
}

.tab-content.active {
    display: block;
}

/* Textarea */
#emailInput {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

#emailInput:focus {
    outline: none;
    border-color: var(--primary);
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--light);
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.or {
    margin: 1rem 0;
    color: var(--gray);
}

.hint {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 1rem;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-success, .btn-outline {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #05c191;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--dark);
}

.btn-outline:hover {
    background: var(--light);
}

/* Results */
.results-section {
    margin-top: 2rem;
    border-top: 2px solid var(--border);
    padding-top: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--gray);
}

/* Provider Tabs */
.provider-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 1rem;
    padding: 10px;
    background: var(--light);
    border-radius: var(--radius);
}

.provider-tab {
    padding: 8px 16px;
    border: none;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.provider-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.provider-tab:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th {
    background: var(--dark);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
}

tr:hover {
    background: rgba(67, 97, 238, 0.05);
}

/* Status Badges */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.valid {
    background: rgba(6, 214, 160, 0.2);
    color: #059669;
}

.status.invalid {
    background: rgba(239, 71, 111, 0.2);
    color: #c92a4a;
}

/* Provider Colors */
.provider-gmail { color: #ea4335; font-weight: 500; }
.provider-yahoo { color: #430098; font-weight: 500; }
.provider-aol { color: #3399ff; font-weight: 500; }
.provider-outlook { color: #0078d4; font-weight: 500; }
.provider-hotmail { color: #f653a6; font-weight: 500; }
.provider-others { color: var(--gray); }
.provider-domain { color: #06d6a0; font-weight: 500; }

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Loading & Error */
.loading, .error {
    text-align: center;
    padding: 2rem;
}

.loading.hidden, .error.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    background: rgba(239, 71, 111, 0.1);
    color: #c92a4a;
    border-radius: var(--radius);
    border-left: 4px solid var(--danger);
}

/* Utility */
.hidden { display: none !important; }

small {
    display: block;
    color: var(--gray);
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

footer {
    text-align: center;
    padding: 1.5rem;
    background: var(--light);
    color: var(--gray);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 { font-size: 1.5rem; }
    main { padding: 1.5rem; }
    .tabs { flex-wrap: wrap; }
    .provider-tabs { justify-content: center; }
    .actions { flex-direction: column; }
    .btn-primary, .btn-success, .btn-secondary, .btn-outline {
        width: 100%;
        justify-content: center;
    }
}