.unit-converter-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    direction: rtl;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

.unit-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.unit-tabs .tab {
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    background: #f5f5f5;
    color: #333;
    min-width: 100px;
    text-align: center;
    outline: none;
}

.unit-tabs .tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.unit-tabs .tab.active {
    background: #0073aa;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.converter-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.unit-input {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    outline: none;
    box-sizing: border-box;
}

.unit-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.unit-select {
    min-width: 200px;
    max-width: 300px;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
    background-size: 12px;
}

.unit-select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.swap-row {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.swap-btn {
    padding: 12px 30px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
    min-width: 180px;
}

.swap-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.result-box {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #f8f9fa;
    min-height: 52px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    font-family: monospace;
    direction: ltr;
    text-align: left;
    overflow-x: auto;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .unit-tabs {
        gap: 8px;
    }
    
    .unit-tabs .tab {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .input-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .unit-input,
    .unit-select,
    .result-box {
        width: 100%;
        min-width: auto;
        max-width: 100%;
    }
    
    .swap-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .unit-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }
    
    .unit-tabs .tab {
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .unit-input,
    .unit-select,
    .result-box {
        font-size: 14px;
        padding: 12px;
    }
}