/* SEO Site Link Analyzer - Modern SaaS Style */
.sla-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1f2937;
}

.sla-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.sla-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.sla-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.sla-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

.sla-form-section {
    padding: 40px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.sla-input-group {
    display: flex;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.sla-input {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s;
    background: white;
}

.sla-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sla-button {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.sla-button-primary {
    background: #667eea;
    color: white;
}

.sla-button-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sla-button-secondary {
    background: #10b981;
    color: white;
    font-size: 14px;
    padding: 10px 20px;
}

.sla-button-secondary:hover {
    background: #059669;
}

.sla-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner */
.sla-spinner-icon {
    width: 20px;
    height: 20px;
    animation: rotate 2s linear infinite;
}

.sla-spinner-icon .path {
    stroke: currentColor;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

.sla-error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 20px;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
    border: 1px solid #fecaca;
    display: none;
}

/* Results Section */
.sla-results {
    padding: 40px;
}

.sla-summary-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sla-stat {
    background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 100%);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s;
}

.sla-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.sla-stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #667eea;
    line-height: 1;
    margin-bottom: 8px;
}

.sla-stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Controls */
.sla-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.sla-search-box {
    flex: 1;
    min-width: 300px;
}

.sla-search-box .sla-input {
    width: 100%;
}

.sla-filter-group {
    display: flex;
    gap: 8px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 10px;
}

.sla-tab-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.sla-tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sla-export-section {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Tab Content */
.sla-tab-content {
    display: none;
}

.sla-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Table Styles */
.sla-table-container {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    max-height: 600px;
    overflow-y: auto;
    background: white;
}

.sla-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sla-table thead {
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sla-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sla-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.sla-table tbody tr:hover {
    background: #f9fafb;
}

.sla-table tbody tr:last-child td {
    border-bottom: none;
}

.sla-link-cell {
    max-width: 300px;
    word-break: break-all;
}

.sla-link-cell a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.sla-link-cell a:hover {
    text-decoration: underline;
}

.sla-anchor-text {
    color: #4b5563;
    font-style: italic;
    max-width: 250px;
    word-break: break-word;
}

/* Scrollbar */
.sla-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.sla-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.sla-table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.sla-table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
    .sla-header {
        padding: 24px;
    }
    
    .sla-title {
        font-size: 24px;
    }
    
    .sla-form-section,
    .sla-results {
        padding: 24px;
    }
    
    .sla-input-group {
        flex-direction: column;
    }
    
    .sla-button {
        width: 100%;
        justify-content: center;
    }
    
    .sla-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sla-search-box {
        min-width: unset;
    }
    
    .sla-filter-group {
        justify-content: center;
    }
    
    .sla-table th,
    .sla-table td {
        padding: 12px;
        font-size: 13px;
    }
    
    .sla-link-cell,
    .sla-anchor-text {
        max-width: 150px;
    }
}

/* Loading State */
.sla-loading {
    text-align: center;
    padding: 60px;
    color: #6b7280;
}

.sla-loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 12px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}