.unit-converter-tool {
    padding: 1rem 0;
}

/* Основной блок конвертации */
.converter-main {
    padding: 1.5rem 0;
}

.converter-input-section {
    margin-bottom: 2rem;
}

/* Выбор единиц */
.converter-units {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.unit-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.unit-selector label {
    font-weight: 500;
    color: var(--text-color);
}

.service-select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.service-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.unit-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 2rem;
}

/* Результат */
.converter-result {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    text-align: center;
}

.result-display {
    margin-bottom: 1.5rem;
}

.result-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.result-unit {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.result-actions .service-copy-btn {
    position: static;
    transform: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    width: auto;
    height: auto;
}

/* Настройки */
.converter-settings {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-color);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.setting-options {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* История и избранное */
.converter-history-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.history-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.history-tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-bottom: -2px;
}

.history-tab-btn:hover {
    color: var(--primary-color);
}

.history-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.history-content {
    min-height: 100px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.history-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.history-item-info {
    flex: 1;
}

.history-item-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.history-item-units {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.history-item-actions {
    display: flex;
    gap: 0.5rem;
}

.history-item-actions button {
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.history-item-actions button:hover {
    background: var(--primary-color);
    color: white;
}

/* Массовая конвертация */
.batch-results {
    margin-top: 1.5rem;
}

.batch-results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.batch-results-table thead {
    background: var(--bg-secondary);
}

.batch-results-table th,
.batch-results-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.batch-results-table th {
    font-weight: 600;
    color: var(--text-color);
}

.batch-results-table td {
    color: var(--text-color);
}

.batch-results-table tr:last-child td {
    border-bottom: none;
}

.batch-results-table .error-cell {
    color: var(--error-color);
    font-size: 0.875rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .converter-units {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .unit-arrow {
        transform: rotate(90deg);
        padding-bottom: 0;
    }
    
    .result-value {
        font-size: 2rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .btn {
        width: 100%;
    }
    
    .setting-options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .batch-results-table {
        font-size: 0.875rem;
    }
    
    .batch-results-table th,
    .batch-results-table td {
        padding: 0.5rem;
    }
}