body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

nav {
    background-color: #333;
    padding: 10px;
    display: flex;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
}

nav a:hover {
    background-color: #555;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.alert {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background-color: #45a049;
}

.btn-danger {
    background-color: #f44336;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.progress-bar-container {
    width: 100%;
    background-color: #ddd;
    border-radius: 4px;
    margin: 10px 0;
    height: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
}

.log-output {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    height: 300px;
    overflow-y: auto;
    font-family: Consolas, monospace;
    margin-top: 20px;
}

.form-control {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 15px;
}

.login-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dashboard {
    padding: 20px;
}

.upload-section {
    margin-bottom: 30px;
}

.progress-section {
    margin-bottom: 20px;
}

.progress-label, .time-label {
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
}

.admin-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
}


/* --- НОВЫЕ СТИЛИ --- */
.negative-keywords-container {
    margin: 15px 0;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
}
.negative-keywords-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #856404;
}
.negative-keyword-tag {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.negative-keyword-tag:hover {
    background: #c82333;
}
.hidden-by-filter {
    display: none !important;
}
/* --- СТИЛИ ДЛЯ КНОПКИ СОРТИРОВКИ --- */
.search-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}
.search-controls input,
.search-controls select,
.search-controls .btn {
    margin-bottom: 5px;
}
.search-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}
.search-controls input,
.search-controls select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}
.search-info {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}
.pagination-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}
.loading {
    text-align: center;
    padding: 40px;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    background: white;
    transition: transform 0.2s;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.wb-card {
    border-left: 4px solid #a100ff;
}
.ozon-card {
    border-left: 4px solid #005bff;
}
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.marketplace-badge {
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}
.price {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
}
.product-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.product-image img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 5px;
}
.product-info {
    flex: 1;
}
.product-title {
    font-size: 18px;
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.product-article {
    color: #6c757d;
    margin: 0 0 15px 0;
}
.keywords {
    margin: 15px 0;
}
.keyword-btn {
    background: #e9ecef;
    border: 1px solid #dee2e6;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.keyword-btn:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}
.btn-success {
    background: #28a745;
    color: white;
}
.btn-danger {
    background: #dc3545;
    color: white;
}
.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}
.btn-secondary {
    background: #6c757d;
    color: white;
}
.no-results, .error-message {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
}

/* Фон для режимов */
body.analogs-mode { background-color: #e8f4ff !important; }
body.declined-mode { background-color: #ffe8e8 !important; }

/* Заголовки внутри resultsContainer */
#resultsContainer h3 {
    margin-top: 0;
    padding-top: 10px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}