/* style.css - Professional Email & Phone Extractor */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #1a202c;
    line-height: 1.6;
}

.email-extractor-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Header Section */
.header-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 40px 60px;
    color: white;
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-icon {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-icon svg {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.header-text h1 {
    margin: 0 0 8px 0;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-text p {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    font-weight: 400;
}

/* Main Content Area */
.options-panel,
.input-section,
.button-group {
    background: white;
    padding: 32px 60px;
}

/* Options Panel */
.options-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.option-item {
    display: flex;
    align-items: center;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.option-label:hover {
    background: #f7fafc;
}

.option-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 24px;
    width: 24px;
    background-color: #f1f5f9;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.option-label:hover .checkmark {
    border-color: #667eea;
    background-color: #eef2ff;
    transform: scale(1.05);
}

.option-label input:checked ~ .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.option-label input:checked ~ .checkmark:after {
    display: block;
}

.option-text {
    font-size: 15px;
    color: #2d3748;
    font-weight: 500;
    line-height: 1.5;
}

/* Input Section */
.input-section {
    border-bottom: 1px solid #e2e8f0;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 14px;
}

.input-label svg {
    color: #667eea;
}

#domain-list {
    width: 100%;
    min-height: 180px;
    max-height: 400px;
    padding: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    transition: all 0.3s ease;
    background: #f8fafc;
}

#domain-list:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

#domain-list::placeholder {
    color: #94a3b8;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover:before {
    width: 300px;
    height: 300px;
}

.btn svg {
    position: relative;
    z-index: 1;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-info {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
}

/* Progress Section */
.progress-section {
    background: white;
    padding: 32px 60px;
    border-bottom: 1px solid #e2e8f0;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    font-size: 14px;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.stat-item svg {
    color: #667eea;
    flex-shrink: 0;
}

.stat-item strong {
    color: #1e293b;
    font-weight: 700;
    font-size: 18px;
}

.progress-bar-container {
    position: relative;
}

.progress-bar {
    height: 14px;
    background: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Results Container */
.results-container {
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.results-header {
    padding: 24px 60px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e2e8f0;
}

.results-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.results-count {
    font-size: 16px;
    font-weight: 500;
    color: #64748b;
}

.results-table-wrapper {
    overflow-x: auto;
    flex: 1;
    padding: 0 60px 32px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.results-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
}

.results-table th {
    padding: 18px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.results-table td {
    padding: 18px 16px;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.results-table tbody tr {
    transition: background-color 0.2s ease;
}

.results-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.04) 0%, rgba(118, 75, 162, 0.04) 100%);
}

/* Table Cell Styles */
.url-cell {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
    color: #64748b;
    max-width: 280px;
    word-break: break-all;
}

.domain-cell {
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.email-cell,
.phone-cell {
    min-width: 200px;
}

.pages-cell {
    color: #64748b;
    font-size: 13px;
    max-width: 200px;
}

/* Badge Styles */
.email-badge,
.phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin: 4px 4px 4px 0;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.email-badge:hover,
.phone-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.email-badge.copied,
.phone-badge.copied {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.email-badge.professional {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.email-badge.professional:hover {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
}

.email-badge.personal {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #7c3aed;
    border: 1px solid #d8b4fe;
}

.email-badge.personal:hover {
    background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
}

.phone-badge {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.phone-badge:hover {
    background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
}

.phone-badge svg {
    width: 12px;
    height: 12px;
}

.no-data {
    color: #cbd5e0;
    font-style: italic;
    font-size: 14px;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 60px 32px;
    background: white;
    border-top: 2px solid #f1f5f9;
}

.pagination-info {
    font-size: 14px;
    color: #64748b;
}

.pagination-info strong {
    color: #1e293b;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-numbers {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 0 12px;
}

.pagination-btn {
    padding: 8px 16px;
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    background: #f8fafc;
    color: #cbd5e0;
    cursor: not-allowed;
    border-color: #f1f5f9;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.pagination-btn.page-btn {
    min-width: 40px;
    justify-content: center;
}

.pagination-ellipsis {
    color: #94a3b8;
    padding: 0 6px;
    font-weight: 600;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    pointer-events: none;
    max-width: 400px;
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.copy-notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

.copy-notification.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

/* Scrollbar Styles */
.results-table-wrapper::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.results-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

.results-table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
}

.results-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .header-section,
    .options-panel,
    .input-section,
    .button-group,
    .progress-section,
    .results-header,
    .results-table-wrapper,
    .pagination-container {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 768px) {
    .header-section {
        flex-direction: column;
        text-align: center;
        padding: 30px 24px;
    }
    
    .header-text h1 {
        font-size: 28px;
    }
    
    .header-text p {
        font-size: 14px;
    }
    
    .options-panel,
    .input-section,
    .button-group,
    .progress-section,
    .results-header,
    .results-table-wrapper,
    .pagination-container {
        padding: 24px;
    }
    
    .options-panel {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-item {
        font-size: 13px;
    }
    
    .results-table th,
    .results-table td {
        padding: 12px 10px;
        font-size: 12px;
    }
    
    .email-badge,
    .phone-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .url-cell {
        max-width: 150px;
        font-size: 11px;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .copy-notification {
        top: 20px;
        right: 20px;
        left: 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .header-icon {
        padding: 16px;
    }
    
    .header-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .header-text h1 {
        font-size: 22px;
    }
    
    .results-table {
        font-size: 11px;
    }
    
    .results-table th {
        font-size: 10px;
        padding: 10px 8px;
    }
    
    .results-table td {
        padding: 10px 8px;
    }
    
    .page-numbers {
        display: none;
    }
    
    .pagination-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Print Styles */
@media print {
    .header-section,
    .options-panel,
    .input-section,
    .button-group,
    .progress-section,
    .pagination-container {
        display: none;
    }
    
    .results-container {
        box-shadow: none;
    }
    
    .results-table th,
    .results-table td {
        border: 1px solid #ddd;
        padding: 8px;
    }
    
    .email-badge,
    .phone-badge {
        border: 1px solid #000;
        color: #000;
        background: none;
    }
}

/* Accessibility */
.btn:focus-visible,
.option-label:focus-visible,
#domain-list:focus-visible,
.pagination-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-container {
    animation: fadeIn 0.5s ease;
}

/* Loading Spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}

/* Empty State */
.results-table tbody:empty:before {
    content: 'No results yet. Enter domains and click "Process Domains" to begin.';
    display: block;
    padding: 60px 40px;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    font-size: 15px;
}

.email-extractor-container > * {
    background: white !important;
}

.email-extractor-container {
    background: white !important;
}

.header-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%) !important;
}

/* Smooth Transitions */
.progress-section,
.results-container,
.pagination-container {
    transition: all 0.3s ease;
}