/* ===== ОСНОВНЫЕ СТИЛИ СРАВНЕНИЯ УДИЛИЩ ===== */
:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --secondary-color: #3b82f6;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --gray-light: #f3f4f6;
    --gray: #6b7280;
    --gray-dark: #374151;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--gray-dark);
    line-height: 1.6;
}

/* Контейнер */
.comparison-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Заголовок */
.comparison-header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--white);
}

.comparison-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.comparison-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Основной контент */
.comparison-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 700px;
}

/* Панель выбора удилищ */
.selection-panel {
    background: var(--gray-light);
    padding: 25px;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
}

.panel-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Фильтры */
.filters-section {
    margin-bottom: 25px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 8px;
}

.filter-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Список удилищ */
.rods-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: var(--white);
}

.rod-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rod-item:hover {
    background: #f0f9ff;
}

.rod-item.selected {
    background: #d1fae5;
    border-left: 4px solid var(--primary-color);
}

.rod-item:last-child {
    border-bottom: none;
}

.rod-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.rod-info {
    flex: 1;
}

.rod-name {
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 3px;
    font-size: 0.95rem;
}

.rod-details {
    font-size: 0.8rem;
    color: var(--gray);
    display: flex;
    gap: 10px;
}

/* Панель сравнения */
.comparison-panel {
    padding: 25px;
    overflow-x: auto;
}

/* Слоты для сравнения */
.comparison-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.slot {
    background: var(--gray-light);
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.slot.filled {
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-color: var(--primary-color);
}

.slot-placeholder {
    color: var(--gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.slot-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.slot-placeholder-text {
    font-size: 0.9rem;
}

/* Карточка удилища в слоте */
.rod-card {
    width: 100%;
}

.rod-card-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.rod-card-img {
    max-height: 100px;
    max-width: 100%;
    object-fit: contain;
}

.rod-card-name {
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 8px;
    font-size: 1rem;
    text-align: center;
}

.rod-card-details {
    font-size: 0.85rem;
    color: var(--gray);
    text-align: center;
    margin-bottom: 5px;
}

/* Кнопка удаления из слота */
.remove-rod {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0;
}

.slot.filled:hover .remove-rod {
    opacity: 1;
}

.remove-rod:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Таблица сравнения */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table th {
    background: var(--gray-light);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-dark);
    border-bottom: 2px solid #e5e7eb;
    min-width: 180px;
}

.comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* Цветовое выделение */
.value-better {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    font-weight: 600;
}

.value-worse {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    font-weight: 600;
}

.value-equal {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

/* Итоги сравнения */
.comparison-summary {
    margin-top: 30px;
    background: var(--gray-light);
    border-radius: 12px;
    padding: 20px;
}

.summary-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    background: var(--white);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.summary-rod-name {
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.summary-wins {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Кнопки */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--gray-dark);
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

/* Сообщения */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.loading {
    text-align: center;
    padding: 30px;
    color: var(--gray);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .comparison-main {
        grid-template-columns: 250px 1fr;
    }
    
    .comparison-slots {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .comparison-main {
        grid-template-columns: 1fr;
    }
    
    .selection-panel {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        max-height: 400px;
    }
    
    .comparison-slots {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        display: block;
        overflow-x: auto;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
}