/* Scanner Section Styles */

.scanner-section {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
}

.scanner-section h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.section-description {
    color: #6c757d;
    margin-bottom: 25px;
}

.scanner-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.domain-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.domain-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.scanning-progress {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

.scanning-progress h3 {
    color: #667eea;
    margin: 20px 0 10px;
}

.scan-note {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 10px;
}

.scan-results {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
}

.results-summary {
    text-align: center;
    padding: 20px;
    background: #d4edda;
    border-radius: 8px;
    margin-bottom: 20px;
}

.results-summary h3 {
    color: #28a745;
    margin-bottom: 10px;
}

.results-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.broken-links-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.broken-links-preview h4 {
    margin-bottom: 15px;
    color: #333;
}

.broken-links-preview ul {
    list-style: none;
    padding: 0;
}

.broken-links-preview li {
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.broken-links-preview li:last-child {
    border-bottom: none;
}

.divider {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dee2e6;
}

.divider span {
    position: relative;
    background: white;
    padding: 0 20px;
    color: #6c757d;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .scanner-section {
        padding: 20px;
    }
    
    .scanner-box {
        padding: 20px;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions button {
        width: 100%;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

main {
    padding: 40px;
}

/* Upload Section */
.upload-section {
    max-width: 900px;
    margin: 0 auto;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.upload-box {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-box h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.help-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.file-label {
    display: block;
    padding: 15px 20px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-label:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.btn-primary {
    width: 100%;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    background: white;
    border: 2px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 8px;
    color: #004085;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-detail {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Results Section */
.results-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.results-header h2 {
    color: #28a745;
    font-size: 1.8rem;
}

.results-actions {
    display: flex;
    gap: 10px;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #667eea;
    color: white;
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 16px;
    border-bottom: 1px solid #dee2e6;
}

tbody tr:hover {
    background: #f8f9fa;
}

.url-cell {
    max-width: 300px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.confidence-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.confidence-high {
    background: #d4edda;
    color: #155724;
}

.confidence-medium {
    background: #fff3cd;
    color: #856404;
}

.confidence-low {
    background: #f8d7da;
    color: #721c24;
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 40px 20px;
}

.error-box {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.error-box h3 {
    color: #721c24;
    margin-bottom: 15px;
}

.error-box p {
    color: #721c24;
    margin-bottom: 20px;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    main {
        padding: 20px;
    }
}
