/**
 * Web Crawler - Main Styles
 *
 * @copyright Copyright (c) 2025 Martin Kiesewetter
 * @author    Martin Kiesewetter <mki@kies-media.de>
 * @link      https://kies-media.de
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffe4e9;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    color: #2c3e50;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
}

button {
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #2980b9;
}

button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status.pending { background: #f39c12; color: white; }
.status.running { background: #3498db; color: white; }
.status.completed { background: #27ae60; color: white; }
.status.failed { background: #e74c3c; color: white; }

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

tr:hover {
    background: #f8f9fa;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    color: #7f8c8d;
    font-weight: 500;
}

.tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-box {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 6px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.stat-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.stat-sublabel {
    font-size: 11px;
    color: #95a5a6;
    margin-top: 3px;
}

.nofollow {
    color: #e74c3c;
    font-weight: 600;
}

.external {
    color: #3498db;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.action-btn {
    padding: 6px 12px;
    font-size: 14px;
    margin-right: 5px;
}

.favicon-cell {
    text-align: center;
    width: 50px;
}

.favicon-img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: contain;
}

.url-cell {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* DataTables Styling */
.dataTables_wrapper {
    padding: 20px 0;
}

.dataTables_filter input {
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-left: 10px;
}

.dataTables_length select {
    padding: 6px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin: 0 10px;
}

.dataTables_info {
    padding-top: 10px;
    color: #7f8c8d;
}

.dataTables_paginate {
    padding-top: 10px;
}

.dataTables_paginate .paginate_button {
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.dataTables_paginate .paginate_button.current {
    background: #3498db;
    color: white !important;
    border-color: #3498db;
}

.dataTables_paginate .paginate_button:hover {
    background: #ecf0f1;
}

.dataTables_paginate .paginate_button.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Filter Group Styles */
.filter-group {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-group label {
    font-weight: bold;
    color: #2c3e50;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Stats Margin Bottom */
.stats-margin-bottom {
    margin-bottom: 20px;
}

/* Section Title */
.section-title {
    margin-top: 30px;
}

/* Progress Section */
.progress-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 14px;
    color: #7f8c8d;
}

.progress-value {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
}

/* Queue Grid */
.queue-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* Stat Sublabel */
.stat-sublabel-inline {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Duplicate Content Box */
.duplicate-box {
    margin-bottom: 15px;
}

.duplicate-content {
    font-size: 14px;
    margin: 10px 0;
}

.duplicate-info {
    font-size: 12px;
}

.duplicate-list {
    margin-top: 5px;
    font-size: 12px;
}

/* Excessive Redirect Row */
.redirect-row-excessive {
    background-color: #fff3cd;
}

.redirect-count-excessive {
    color: #e74c3c;
}

/* Asset Type Badge */
.asset-type-badge {
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

/* Internal Link */
.internal-link {
    color: #3498db;
}

/* Stat Value Colors */
.stat-value-danger {
    color: #e74c3c;
}

.stat-value-success {
    color: #27ae60;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 15px 25px;
    border-radius: 6px;
    z-index: 1000;
    font-weight: bold;
}

/* Asset Type Colors */
.asset-type-default {
    background: #7f8c8d;
}

.asset-type-page {
    background: #3498db;
}

.asset-type-image {
    background: #2ecc71;
}

.asset-type-script {
    background: #e74c3c;
}